From b53dea8f9fcb135b818a78028579c1dc42584716 Mon Sep 17 00:00:00 2001 From: Sen66 Date: Thu, 5 Mar 2026 14:25:06 +0100 Subject: [PATCH] fix crash on application close --- src/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 1ff1dc4..d2405a3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1668,10 +1668,11 @@ MainWindow::~MainWindow() { * */ - // Disconnect all dock destroyed signals before members are torn down, + // Disconnect all signals before members are torn down, // so the lambdas capturing 'this' never fire on a half-destroyed object. for (auto it = m_tabs.begin(); it != m_tabs.end(); ++it) { disconnect(it.key(), &QObject::destroyed, this, nullptr); + disconnect(&it->doc->undoStack, nullptr, this, nullptr); // Release providers now while plugin DLLs are still loaded; // if deferred to Qt child cleanup the DLL code may already be unloaded. it->doc->provider.reset();