prevent crash when loading invalid file

This commit is contained in:
tildearrow 2021-12-19 13:14:41 -05:00
parent ea19f133d6
commit 39dee5a343

View file

@ -1680,6 +1680,8 @@ int FurnaceGUI::load(String path) {
e->quitDispatch();
if (!e->load(file,(size_t)len)) {
logE("could not open file!\n");
e->initDispatch();
e->reset();
return 1;
}
e->initDispatch();