]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
crash when switching between modules (HYDRO/PARAVIS/MESH) BR_H2018
authorisn <isn@opencascade.com>
Thu, 21 Feb 2019 11:40:53 +0000 (14:40 +0300)
committerisn <isn@opencascade.com>
Thu, 21 Feb 2019 11:40:53 +0000 (14:40 +0300)
src/LightApp/LightApp_Application.cxx

index 128df3e64ff5fde858c1a40663fb0ef3e3f8b286..3654493e29968fa93326087c447739016b7dc8af 100644 (file)
@@ -4134,15 +4134,22 @@ void LightApp_Application::updateWindows()
       getWindow( it.key() );
   }
 
+  QList<int> toRemove;
   for ( WinMap::ConstIterator it = myWin.begin(); it != myWin.end(); ++it )
   {
     QWidget* wid = it.value();
     if ( winMap.contains( it.key() ) )
       wid->setVisible( true );
     else
-      delete wid;
+    {
+      wid->deleteLater();
+      toRemove.append(it.key());
+    }
   }
 
+  foreach(int k, toRemove) 
+    myWin.remove(k);
+
   loadDockWindowsState();
 }