diff --git a/src/app/puzzle/vpmainwindow.cpp b/src/app/puzzle/vpmainwindow.cpp index 16f9c10b9..1fae79464 100644 --- a/src/app/puzzle/vpmainwindow.cpp +++ b/src/app/puzzle/vpmainwindow.cpp @@ -573,7 +573,10 @@ auto VPMainWindow::LoadFile(const QString &path) -> bool void VPMainWindow::LayoutWasSaved(bool saved) { setWindowModified(!saved); - not IsLayoutReadOnly() ? ui->actionSave->setEnabled(!saved) : ui->actionSave->setEnabled(false); + if (ui) + { + not IsLayoutReadOnly() ? ui->actionSave->setEnabled(!saved) : ui->actionSave->setEnabled(false); + } } //---------------------------------------------------------------------------------------------------------------------