Fix Puzzle's crash.

This commit is contained in:
Roman Telezhynskyi 2024-03-13 15:11:56 +02:00
parent 88cee6b7a7
commit eb4f8719f2

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