PAL21685: Fatal error after save/open study with Edit group as standalone group

* protect SObjectToObject() from exception in case of invalid IOR
This commit is contained in:
eap 2010-04-27 06:37:28 +00:00
parent 2a69c947b9
commit c823ef454d

View File

@ -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();