]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Suppress usage of deleted object.
authorjfa <jfa@opencascade.com>
Thu, 22 Dec 2005 14:07:46 +0000 (14:07 +0000)
committerjfa <jfa@opencascade.com>
Thu, 22 Dec 2005 14:07:46 +0000 (14:07 +0000)
src/SVTK/SVTK_Selector.cxx

index 625593eca556c2f8d4d0ab0fb55ec86c98feffe1..471c3b8ec5924bf3595d0e0b848a46789ef1e14d 100644 (file)
@@ -245,10 +245,12 @@ SVTK_SelectorDef
   for(int i = 1, iEnd = theIndices.Extent(); i <= iEnd; i++)
     aMapIndex.Add(theIndices(i));
   
-  if(aMapIndex.IsEmpty())
+  if(aMapIndex.IsEmpty()) {
     myMapIOSubIndex.erase(theIO);
+    return false;
+  }
 
-  return !aMapIndex.IsEmpty();
+  return true;
 }
 
 
@@ -273,10 +275,12 @@ SVTK_SelectorDef
   for(; anIter.More(); anIter.Next())
     aMapIndex.Add(anIter.Key());
   
-  if(aMapIndex.IsEmpty())
+  if(aMapIndex.IsEmpty()) {
     myMapIOSubIndex.erase(theIO);
+    return false;
+  }
 
-  return !aMapIndex.IsEmpty();
+  return true;
 }