From 3aafecb7b95a12e4b1cf52f36c1e1e51e30805ee Mon Sep 17 00:00:00 2001 From: "j.novak@netsystem.cz" Date: Mon, 31 Oct 2022 16:01:58 +0000 Subject: [PATCH] Main dialog: Wireshark stops extcap on exit if no packets received yet --- ui/qt/wireshark_main_window.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ui/qt/wireshark_main_window.cpp b/ui/qt/wireshark_main_window.cpp index 186fed40f2..b30eb1cc5d 100644 --- a/ui/qt/wireshark_main_window.cpp +++ b/ui/qt/wireshark_main_window.cpp @@ -932,6 +932,13 @@ void WiresharkMainWindow::keyPressEvent(QKeyEvent *event) { } void WiresharkMainWindow::closeEvent(QCloseEvent *event) { + if (main_ui_->actionCaptureStop->isEnabled()) { + // Capture is running, we should stop it before close and ignore the event + stopCapture(); + event->ignore(); + return; + } + saveWindowGeometry(); /* If we're in the middle of stopping a capture, don't do anything;