From 629c02adbef62cdad266298da0399f8426f14cde Mon Sep 17 00:00:00 2001 From: Jeremy Hu Date: Wed, 12 Jun 2019 21:03:38 +0930 Subject: [PATCH] Fix multiple windows crash when preference change --- src/document.cpp | 4 ++-- src/documentwindow.cpp | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/document.cpp b/src/document.cpp index c7f19f16..cf23a695 100644 --- a/src/document.cpp +++ b/src/document.cpp @@ -1501,7 +1501,7 @@ void Document::meshReady() delete m_meshGenerator; m_meshGenerator = nullptr; - qDebug() << "MeshLoader generation done"; + qDebug() << "Mesh generation done"; m_isPostProcessResultObsolete = true; m_isRigObsolete = true; @@ -1558,7 +1558,7 @@ void Document::generateMesh() return; } - qDebug() << "MeshLoader generating.."; + qDebug() << "Mesh generating.."; settleOrigin(); diff --git a/src/documentwindow.cpp b/src/documentwindow.cpp index f132001c..846d0906 100644 --- a/src/documentwindow.cpp +++ b/src/documentwindow.cpp @@ -1118,6 +1118,7 @@ DocumentWindow::~DocumentWindow() { emit uninialized(); g_documentWindows.erase(this); + delete m_document; } void DocumentWindow::showEvent(QShowEvent *event)