From: jfa Date: Wed, 26 Oct 2005 10:06:19 +0000 (+0000) Subject: PAL10400: ComponentIOR() leads to Salome crash if the IOR is not set X-Git-Tag: V2_2_6~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=41d1f7c7e48018f6cda4675c798ea7ca7c14097a;p=modules%2Fkernel.git PAL10400: ComponentIOR() leads to Salome crash if the IOR is not set --- diff --git a/src/SALOMEDS/SALOMEDS_SComponent_i.cxx b/src/SALOMEDS/SALOMEDS_SComponent_i.cxx index abb002152..51ef75f81 100644 --- a/src/SALOMEDS/SALOMEDS_SComponent_i.cxx +++ b/src/SALOMEDS/SALOMEDS_SComponent_i.cxx @@ -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;