Salome HOME
IPAL0051790: TC7.2.0: SIGSEGV fatal error after close study
authormpa <mpa@opencascade.com>
Fri, 22 Mar 2013 08:03:32 +0000 (08:03 +0000)
committermpa <mpa@opencascade.com>
Fri, 22 Mar 2013 08:03:32 +0000 (08:03 +0000)
src/SUIT/SUIT_SelectionMgr.cxx

index 56c1759ca666030c61df5296bf9b13dffc7993a1..b6b2a0a2b726aa067fc8fc4791d23ff12f853703 100755 (executable)
@@ -41,8 +41,10 @@ myIsSelChangeEnabled( true )
 /*!destructor. mySelectors auto delete.*/
 SUIT_SelectionMgr::~SUIT_SelectionMgr()
 {
-  for ( SelectorList::iterator it = mySelectors.begin(); it != mySelectors.end(); ++it )
+  while( !mySelectors.empty() ) {
+    SelectorList::iterator it = mySelectors.begin();
     delete *it;
+  }
 }
 
 /*!Add selector \a sel to selectors list,if it's not exists in list.*/