aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorj.novak@netsystem.cz <j.novak@netsystem.cz>2022-10-31 16:01:58 +0000
committerAndersBroman <a.broman58@gmail.com>2022-10-31 16:01:58 +0000
commit3aafecb7b95a12e4b1cf52f36c1e1e51e30805ee (patch)
tree39291b66427a99ff96b550711bb0261a3b3c4cbf
parent190b74bc066d1d19e19261664016fb1926c6db5a (diff)
Main dialog: Wireshark stops extcap on exit if no packets received yet
-rw-r--r--ui/qt/wireshark_main_window.cpp7
1 files changed, 7 insertions, 0 deletions
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;