diff --git a/client/mainwindow.cpp b/client/mainwindow.cpp index 782717a..12fa8a5 100644 --- a/client/mainwindow.cpp +++ b/client/mainwindow.cpp @@ -133,11 +133,12 @@ MainWindow::~MainWindow() delete pgl; - // We don't want to save state for Stream Stats Docks - so close them + // We don't want to save state for Stream Stats Docks - so delete them QList streamStatsDocks = findChildren("streamStatsDock"); foreach(QDockWidget *dock, streamStatsDocks) - dock->close(); // this dock is already set to delete on close + delete dock; + Q_ASSERT(findChildren("streamStatsDock").size() == 0); QByteArray layout = saveState(0); appSettings->setValue(kApplicationWindowLayout, layout);