mirror of
https://github.com/NohamR/Reclass.git
synced 2026-05-10 19:59:21 +00:00
fix crash on application close
This commit is contained in:
@@ -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.
|
// so the lambdas capturing 'this' never fire on a half-destroyed object.
|
||||||
for (auto it = m_tabs.begin(); it != m_tabs.end(); ++it) {
|
for (auto it = m_tabs.begin(); it != m_tabs.end(); ++it) {
|
||||||
disconnect(it.key(), &QObject::destroyed, this, nullptr);
|
disconnect(it.key(), &QObject::destroyed, this, nullptr);
|
||||||
|
disconnect(&it->doc->undoStack, nullptr, this, nullptr);
|
||||||
// Release providers now while plugin DLLs are still loaded;
|
// Release providers now while plugin DLLs are still loaded;
|
||||||
// if deferred to Qt child cleanup the DLL code may already be unloaded.
|
// if deferred to Qt child cleanup the DLL code may already be unloaded.
|
||||||
it->doc->provider.reset();
|
it->doc->provider.reset();
|
||||||
|
|||||||
Reference in New Issue
Block a user