From: eap Date: Tue, 27 Apr 2010 06:37:28 +0000 (+0000) Subject: PAL21685: Fatal error after save/open study with Edit group as standalone group X-Git-Tag: V5_1_4rc1~24 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c823ef454d27e1d24ab3e111f903b95f2d5e863d;p=modules%2Fsmesh.git PAL21685: Fatal error after save/open study with Edit group as standalone group * protect SObjectToObject() from exception in case of invalid IOR --- diff --git a/src/SMESHGUI/SMESHGUI_Utils.cxx b/src/SMESHGUI/SMESHGUI_Utils.cxx index 8ccf90b24..6f921cd22 100644 --- a/src/SMESHGUI/SMESHGUI_Utils.cxx +++ b/src/SMESHGUI/SMESHGUI_Utils.cxx @@ -190,7 +190,10 @@ namespace SMESH if (theSObject->FindAttribute(anAttr, "AttributeIOR")) { _PTR(AttributeIOR) anIOR = anAttr; CORBA::String_var aVal = anIOR->Value().c_str(); - return app->orb()->string_to_object(aVal); + // string_to_object() DOC: If the input string is not valid ... + // a CORBA::SystemException is thrown. + if ( aVal && strlen( aVal ) > 0 ) + return app->orb()->string_to_object(aVal); } } return CORBA::Object::_nil();