Fix crashing. Deleting QUndoStack can trigger QUndoStack::cleanChanged which will call LayoutWasSaved method after deleting VPMainWindow.

This commit is contained in:
Roman Telezhynskyi 2024-06-28 08:24:26 +03:00
parent 3c69641e18
commit 77631d9bd4

View file

@ -450,7 +450,12 @@ VPMainWindow::VPMainWindow(VPCommandLinePtr cmd, QWidget *parent)
}
//---------------------------------------------------------------------------------------------------------------------
VPMainWindow::~VPMainWindow() = default;
VPMainWindow::~VPMainWindow()
{
// Preventing crash. Deleting QUndoStack can trigger QUndoStack::cleanChanged which will call LayoutWasSaved method
// after deleting VPMainWindow.
m_undoStack->blockSignals(true);
}
//---------------------------------------------------------------------------------------------------------------------
auto VPMainWindow::CurrentFile() const -> QString