]> SALOME platform Git repositories - modules/superv.git/commitdiff
Salome HOME
Two checks were added to avoid exception during GraphErr_Msgs.py T3_2_1_pre
authormkr <mkr@opencascade.com>
Wed, 12 Jul 2006 13:56:18 +0000 (13:56 +0000)
committermkr <mkr@opencascade.com>
Wed, 12 Jul 2006 13:56:18 +0000 (13:56 +0000)
script running.

src/GraphExecutor/DataFlowExecutor_PyDynInvoke.cxx

index b7042740b64bdacc7613816ad52be31a98aaa83f..16f902b72f57a1d8cd685cd8c14ee35dc2596892 100644 (file)
@@ -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 ;
         }