Main dialog: Wireshark stops extcap on exit if no packets received yet

This commit is contained in:
j.novak@netsystem.cz 2022-10-31 16:01:58 +00:00 committed by AndersBroman
parent 190b74bc06
commit 3aafecb7b9
1 changed files with 7 additions and 0 deletions

View File

@ -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;