From c823ef454d27e1d24ab3e111f903b95f2d5e863d Mon Sep 17 00:00:00 2001 From: eap Date: Tue, 27 Apr 2010 06:37:28 +0000 Subject: [PATCH] PAL21685: Fatal error after save/open study with Edit group as standalone group * protect SObjectToObject() from exception in case of invalid IOR --- src/SMESHGUI/SMESHGUI_Utils.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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(); -- 2.30.2