diff options
author | Nadia Holmquist Pedersen <nadia@nhp.sh> | 2023-12-26 08:49:02 +0100 |
---|---|---|
committer | Nadia Holmquist Pedersen <nadia@nhp.sh> | 2023-12-26 08:49:02 +0100 |
commit | 740489f7a4a848bd3f96f1c911a6c7db5f6cc27f (patch) | |
tree | 3af035cd0da8c7384ad40aa0ecbbe9f1dc6013ae | |
parent | ac3153d86bc66e5839e45b3a1fbc91f7e8b64a91 (diff) |
Don't call Reset on nullptr
-rw-r--r-- | src/frontend/qt_sdl/main.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/frontend/qt_sdl/main.cpp b/src/frontend/qt_sdl/main.cpp index 3f53f3c..7ba37c1 100644 --- a/src/frontend/qt_sdl/main.cpp +++ b/src/frontend/qt_sdl/main.cpp @@ -329,10 +329,14 @@ bool EmuThread::UpdateConsole(UpdateConsoleNDSArgs&& ndsargs, UpdateConsoleGBAAr NDS::Current = nullptr; NDS = CreateConsole(std::move(nextndscart), std::move(nextgbacart)); + + if (NDS == nullptr) + return false; + NDS->Reset(); NDS::Current = NDS.get(); - return NDS != nullptr; + return true; } auto arm9bios = ROMManager::LoadARM9BIOS(); |