From b4a476bb7bbb96a28a67aeedc0669466eabc15e0 Mon Sep 17 00:00:00 2001 From: jfa Date: Thu, 22 Dec 2005 14:07:46 +0000 Subject: [PATCH] Suppress usage of deleted object. --- src/SVTK/SVTK_Selector.cxx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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; } -- 2.39.2