mirror of https://github.com/mgba-emu/mgba.git
Qt: Fix crashing on loading a deleted recent script
This commit is contained in:
parent
d4d7a3b6b9
commit
91ee9822d1
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue