diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 10c323e1..3abe0ef3 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -439,11 +439,15 @@ void MainWindow::closeEvent(QCloseEvent *event) if (ret == QMessageBox::Save) { if (saveProject(true) && !Core()->currentlyDebugging) { saveSettings(); + } else if (Core()->currentlyDebugging) { + Core()->stopDebug(); } QMainWindow::closeEvent(event); } else if (ret == QMessageBox::Discard) { if (!Core()->currentlyDebugging) { saveSettings(); + } else if (Core()->currentlyDebugging) { + Core()->stopDebug(); } QMainWindow::closeEvent(event); } else {