]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
PAL10400: ComponentIOR() leads to Salome crash if the IOR is not set
authorjfa <jfa@opencascade.com>
Wed, 26 Oct 2005 10:06:19 +0000 (10:06 +0000)
committerjfa <jfa@opencascade.com>
Wed, 26 Oct 2005 10:06:19 +0000 (10:06 +0000)
src/SALOMEDS/SALOMEDS_SComponent_i.cxx

index abb002152bc1d7ac40ddbd135db1e42b5d5c6de3..51ef75f810e99eea0991c3d634854b26bc776a5e 100644 (file)
@@ -129,8 +129,10 @@ CORBA::Boolean SALOMEDS_SComponent_i::ComponentIOR(CORBA::String_out IOR)
   SALOMEDS::Locker lock;
 
   Handle(SALOMEDS_IORAttribute) ior;
-  if (!_lab.FindAttribute(SALOMEDS_IORAttribute::GetID(),ior) )
-      return false;
+  if (!_lab.FindAttribute(SALOMEDS_IORAttribute::GetID(),ior)) {
+    IOR = CORBA::string_dup("");
+    return false;
+  }
   TCollection_AsciiString ch(ior->Get());
   IOR = CORBA::string_dup(ch.ToCString());
   return true;