Skip to content

Commit

Permalink
Don't call Reset on nullptr
Browse files Browse the repository at this point in the history
  • Loading branch information
nadiaholmquist committed Dec 26, 2023
1 parent ac3153d commit 740489f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/frontend/qt_sdl/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 740489f

Please sign in to comment.