From 2cbc4d51fcbda28f4dddf153e4d91c9a8b35988e Mon Sep 17 00:00:00 2001 From: isn Date: Thu, 21 Feb 2019 14:40:53 +0300 Subject: [PATCH] crash when switching between modules (HYDRO/PARAVIS/MESH) --- src/LightApp/LightApp_Application.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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(); } -- 2.39.2