From 31f9d61637d84da66ba15d802a124e524d0cf204 Mon Sep 17 00:00:00 2001 From: env Date: Tue, 26 Jul 2005 09:32:37 +0000 Subject: [PATCH] ENV: Fix of regression after Windows porting. --- src/SALOMEDS/SALOMEDS_Study_i.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/SALOMEDS/SALOMEDS_Study_i.cxx b/src/SALOMEDS/SALOMEDS_Study_i.cxx index 0306c28c0..32e0cfc9b 100644 --- a/src/SALOMEDS/SALOMEDS_Study_i.cxx +++ b/src/SALOMEDS/SALOMEDS_Study_i.cxx @@ -674,12 +674,14 @@ void SALOMEDS_Study_i::RemovePostponed(CORBA::Long theUndoLimit) int aLegth = aSeq->Length(); for(int i = 1; i <= aLegth; i++) { TCollection_AsciiString anIOR = aSeq->Value(i); - if (anIOR.Value(1) == 'c') { + //mkr : fix for bug IPAL9408 : check the length of anIOR + // before take value from it + if ( !anIOR.IsEmpty() && anIOR.Value(1) == 'c') { CORBA::Object_var obj = _orb->string_to_object(anIOR.Split(1).ToCString()); SALOME::GenericObj_var aGeneric = SALOME::GenericObj::_narrow(obj); if (!CORBA::is_nil(aGeneric)) aGeneric->Destroy(); } - else if (anIOR.Value(1) == 'd') { + else if ( !anIOR.IsEmpty() && anIOR.Value(1) == 'd') { CORBA::Object_var obj = _orb->string_to_object(anIOR.Split(1).ToCString()); SALOME::GenericObj_var aGeneric = SALOME::GenericObj::_narrow(obj); if (!CORBA::is_nil(aGeneric)) aGeneric->Destroy(); -- 2.39.2