diff --git a/ui/qt/interface_tree.cpp b/ui/qt/interface_tree.cpp index 607146a755..a630f8657a 100644 --- a/ui/qt/interface_tree.cpp +++ b/ui/qt/interface_tree.cpp @@ -73,11 +73,10 @@ InterfaceTree::~InterfaceTree() { while (*iter) { QList *points; - QVariant v; - v = (*iter)->data(1, Qt::UserRole); - points = v.value *>(); + points = (*iter)->data(1, Qt::UserRole).value *>(); delete(points); + ++iter; } } diff --git a/ui/qt/main_window.cpp b/ui/qt/main_window.cpp index a06c2b4367..2517084104 100644 --- a/ui/qt/main_window.cpp +++ b/ui/qt/main_window.cpp @@ -386,6 +386,9 @@ void MainWindow::closeEvent(QCloseEvent *event) { return; } + // Make sure we kill any open dumpcap processes. + delete main_welcome_; + if(testCaptureFileClose(true)) { /* QCoreApplication::quit() won't exit properly * because when during initialization phase we are not in the event loop */