]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
NPAL16136: Error FindObjectIOR after RemoveObjectWithChildren: removed object found.
authorjfa <jfa@opencascade.com>
Tue, 5 Jun 2007 12:51:19 +0000 (12:51 +0000)
committerjfa <jfa@opencascade.com>
Tue, 5 Jun 2007 12:51:19 +0000 (12:51 +0000)
src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx

index e34aa990ad677333f6259e502891cea7e71c5da0..43a59f7ace3b619576d8479e9b6087806e61fa32 100644 (file)
@@ -343,17 +343,19 @@ Handle(TColStd_HSequenceOfTransient) SALOMEDSImpl_Study::FindObjectByName(const
 Handle(SALOMEDSImpl_SObject) SALOMEDSImpl_Study::FindObjectIOR(const TCollection_AsciiString& anObjectIOR)
 {
   _errorCode = "";
-  
+
   Handle(SALOMEDSImpl_SObject) aResult = NULL;
-  
+
   // searching in the datamap for optimization
   if (myIORLabels.IsBound(anObjectIOR)) {
     aResult = GetSObject(myIORLabels.Find(anObjectIOR));
     // 11 oct 2002: forbidden attributes must be checked here
-    if (!aResult->GetLabel().IsAttribute(SALOMEDSImpl_AttributeIOR::GetID()))
+    if (!aResult->GetLabel().IsAttribute(SALOMEDSImpl_AttributeIOR::GetID())) {
       myIORLabels.UnBind(anObjectIOR);
+      aResult = NULL;
+    }
   }
-  
+
   if(aResult.IsNull()) _errorCode = "No object was found";
   return aResult;
 }