From 39dee5a34318c886b0cc154b7fb0ac2479a76c97 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Sun, 19 Dec 2021 13:14:41 -0500 Subject: [PATCH] prevent crash when loading invalid file --- src/gui/gui.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 3387fafbf..ca7774127 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -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();