From: mkr Date: Wed, 12 Jul 2006 13:56:18 +0000 (+0000) Subject: Two checks were added to avoid exception during GraphErr_Msgs.py X-Git-Tag: T3_2_1_pre X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=320caf906adc3ca0ec502c5cdb10ead4def1434b;p=modules%2Fsuperv.git Two checks were added to avoid exception during GraphErr_Msgs.py script running. --- diff --git a/src/GraphExecutor/DataFlowExecutor_PyDynInvoke.cxx b/src/GraphExecutor/DataFlowExecutor_PyDynInvoke.cxx index b704274..16f902b 100644 --- a/src/GraphExecutor/DataFlowExecutor_PyDynInvoke.cxx +++ b/src/GraphExecutor/DataFlowExecutor_PyDynInvoke.cxx @@ -498,7 +498,7 @@ bool GraphExecutor::InNode::PyDynInvoke( PyObject * MyPyRunMethod , else { ArgValue = Result ; } - if ( !PyString_Check( ArgValue ) ) { + if ( !ArgValue || !PyString_Check( ArgValue ) ) { cdebug << "ArgOut" << i << " : " << sname << " " << method << " ERROR (string)" << endl ; RetVal = false ; } @@ -507,9 +507,10 @@ bool GraphExecutor::InNode::PyDynInvoke( PyObject * MyPyRunMethod , } data <<= t ; #if PyDynInvokeTrace - cdebug << "ArgOut" << i << " : " << sname << " " << method << " Value " << t << " (string)" - << " Result->ob_refcnt" << Result->ob_refcnt << " ArgValue->ob_refcnt" - << ArgValue->ob_refcnt << endl ; + if ( ArgValue ) + cdebug << "ArgOut" << i << " : " << sname << " " << method << " Value " << t << " (string)" + << " Result->ob_refcnt" << Result->ob_refcnt << " ArgValue->ob_refcnt" + << ArgValue->ob_refcnt << endl ; #endif break ; }