Fix Puzzle's crash.

develop
Roman Telezhynskyi 2024-03-13 15:11:56 +02:00
parent 88cee6b7a7
commit eb4f8719f2
1 changed files with 4 additions and 1 deletions

View File

@ -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);
}
}
//---------------------------------------------------------------------------------------------------------------------