From: isn Date: Thu, 21 Feb 2019 11:40:53 +0000 (+0300) Subject: crash when switching between modules (HYDRO/PARAVIS/MESH) X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FBR_H2018;p=modules%2Fgui.git crash when switching between modules (HYDRO/PARAVIS/MESH) --- diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index 128df3e64..3654493e2 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -4134,15 +4134,22 @@ void LightApp_Application::updateWindows() getWindow( it.key() ); } + QList 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(); }