From: jfa Date: Thu, 22 Dec 2005 14:07:46 +0000 (+0000) Subject: Suppress usage of deleted object. X-Git-Tag: T_Before_Join_BR_3_1_0deb~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b4a476bb7bbb96a28a67aeedc0669466eabc15e0;p=modules%2Fgui.git Suppress usage of deleted object. --- diff --git a/src/SVTK/SVTK_Selector.cxx b/src/SVTK/SVTK_Selector.cxx index 625593eca..471c3b8ec 100644 --- a/src/SVTK/SVTK_Selector.cxx +++ b/src/SVTK/SVTK_Selector.cxx @@ -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; }