1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-10-06 09:17:07 +02:00

Add check if main project file actually exists

This commit is contained in:
Elias Steurer 2023-07-13 12:43:11 +02:00
parent 0813f6a473
commit 55f1ab0c24

View File

@ -27,6 +27,12 @@ bool ProjectFile::init()
return false;
file = obj.value("file").toString();
QFileInfo fileInfo(folder.path() + "/"+ file);
if(!fileInfo.exists()){
qCritical() << "Requested file:" << fileInfo.absoluteFilePath() << "does not exist!";
return false;
}
if (!obj.contains("title"))
return false;
title = obj.value("title").toString();