Merge pull request #1031 from ispyisail/fix/bugtracker-240-backup-crash

Fix bugtracker #240: crash when a recovery file cannot be opened
This commit is contained in:
ispyisail
2026-09-26 07:13:40 +12:00
committed by GitHub
+3 -1
View File
@@ -2338,6 +2338,8 @@ void QETDiagramEditor::openBackupFiles(QList<KAutoSaveFile *> backup_files)
//Create the project
DialogWaiting::instance(this);
//QETProject takes ownership of file and deletes it, whether or not it opens
const QString file_name = file->managedFile().fileName();
QETProject *project = new QETProject(file, this);
if (project->state() != QETProject::Ok)
{
@@ -2348,7 +2350,7 @@ void QETDiagramEditor::openBackupFiles(QList<KAutoSaveFile *> backup_files)
tr("Échec de l'ouverture du projet", "message box title"),
QString(tr(
"Une erreur est survenue lors de l'ouverture du fichier %1.",
"message box content")).arg(file->managedFile().fileName()));
"message box content")).arg(file_name));
}
delete project;
DialogWaiting::dropInstance();