From: eap Date: Thu, 5 May 2011 15:16:02 +0000 (+0000) Subject: fix dupming a nil servant X-Git-Tag: V6_3_0b1~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=15f3190af683bccc2a1673f6c16a851813c96271;p=modules%2Fsmesh.git fix dupming a nil servant --- diff --git a/src/SMESH_I/SMESH_DumpPython.cxx b/src/SMESH_I/SMESH_DumpPython.cxx index 63fd737e6..34b7f12bd 100644 --- a/src/SMESH_I/SMESH_DumpPython.cxx +++ b/src/SMESH_I/SMESH_DumpPython.cxx @@ -224,13 +224,15 @@ namespace SMESH TPythonDump:: operator<<(SMESH::SMESH_IDSource_ptr theArg) { + if ( CORBA::is_nil( theArg ) ) + return *this << "None"; SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen(); SALOMEDS::Study_var aStudy = aSMESHGen->GetCurrentStudy(); SALOMEDS::SObject_var aSObject = SMESH_Gen_i::ObjectToSObject(aStudy,theArg); - if(!aSObject->_is_nil() || CORBA::is_nil( theArg )) + if(!aSObject->_is_nil()) return *this << aSObject; SMESH::SMESH_Mesh_var mesh = theArg->GetMesh(); - if ( !theArg->_is_equivalent( mesh) ) + if ( !theArg->_is_equivalent( mesh )) { SMESH::long_array_var anElementsId = theArg->GetIDs(); SMESH::array_of_ElementType_var types = theArg->GetTypes();