From 41d1f7c7e48018f6cda4675c798ea7ca7c14097a Mon Sep 17 00:00:00 2001 From: jfa Date: Wed, 26 Oct 2005 10:06:19 +0000 Subject: [PATCH] PAL10400: ComponentIOR() leads to Salome crash if the IOR is not set --- src/SALOMEDS/SALOMEDS_SComponent_i.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; -- 2.39.2