From c7e417b0443b6ffb970dad5ab06a2c6326d7a9a7 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 23 Nov 2025 22:52:50 -0500 Subject: [PATCH] Fix some QPointers not clearing promptly in Qt5 --- CHANGELOG.md | 1 + src/mainwindow.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8452c43d..4c39d3d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ and this project somewhat adheres to [Semantic Versioning](https://semver.org/sp - Previously, the middle mouse button could be used as a shortcut with the pencil tool to switch to bucket-fill mode. This is now achieved using the `Alt` key. ### Fixed +- Fix crash on older versions of Qt when reopening a project with certain windows open. - Fix potential crash when painting and the cursor leaves the map area. - Fix rare crash while quitting Porymap. - Fix `Edit > Clear Map Entries` in the Region Map Editor not saving the applied changes. diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 1781e51e..ea7ef706 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -3246,7 +3246,7 @@ bool MainWindow::closeSupplementaryWindows() { // We have some QPointers to windows that may have been closed above. // Make sure we force them to update to nullptr now; they may be read // before the next event loop gets a chance to update them. - QApplication::sendPostedEvents(); + QApplication::sendPostedEvents(nullptr, QEvent::DeferredDelete); return true; }