all repos — mgba @ 7d79db7d7d31f5a956123e751f455eee9d4b043e

mGBA Game Boy Advance Emulator

Qt: Don't crash if patch isn't present
Vicki Pfau vi@endrift.com
Sat, 01 Sep 2018 21:22:07 -0700
commit

7d79db7d7d31f5a956123e751f455eee9d4b043e

parent

11880f5760451857b0e74dbc92975791d2ad0327

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M src/platform/qt/CoreController.cppsrc/platform/qt/CoreController.cpp

@@ -571,8 +571,8 @@ VFile* patch = VFileDevice::open(patchPath, O_RDONLY);

if (patch) { m_threadContext.core->loadPatch(m_threadContext.core, patch); m_patched = true; + patch->close(patch); } - patch->close(patch); if (mCoreThreadHasStarted(&m_threadContext)) { reset(); }