Qt: Fix crashing on loading a deleted recent script

This commit is contained in:
Vicki Pfau 2022-07-10 17:13:34 -07:00
parent d4d7a3b6b9
commit 91ee9822d1
1 changed files with 3 additions and 0 deletions

View File

@ -61,6 +61,9 @@ void ScriptingController::setController(std::shared_ptr<CoreController> controll
bool ScriptingController::loadFile(const QString& path) {
VFileDevice vf(path, QIODevice::ReadOnly);
if (!vf.isOpen()) {
return false;
}
return load(vf, path);
}