]> sigrok.org Git - pulseview.git/blobdiff - pv/mainwindow.cpp
MainWindow, View::View: Fix two memory errors reported by valgrind
[pulseview.git] / pv / mainwindow.cpp
index f7c47122737216fba1fa32472d70f10cf6b5b71c..d65537483c8f1a19bd91e6ccd93dee7014b80bfc 100644 (file)
@@ -280,8 +280,9 @@ void MainWindow::remove_session(shared_ptr<Session> session)
                                // that Qt keeps a pointer to the view around
                                entry.second->setParent(0);
 
-                               // Remove this entry from the container
+                               // Remove this entry from the container and stop iterating.
                                view_docks_.erase(entry.first);
+                               break;
                        }
        }