Skip to content

Commit

Permalink
EmuInstance: check consoleType from NDS rather than the instance's when
Browse files Browse the repository at this point in the history
updating console, fixes crash on console type switch

EmuInstance::consoleType is already updated, so the check for whether we
should recreate the NDS to switch console type never succeeds.
  • Loading branch information
nadiaholmquist committed Jul 2, 2024
1 parent db20771 commit f261168
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/frontend/qt_sdl/EmuInstance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1172,7 +1172,7 @@ bool EmuInstance::updateConsole(UpdateConsoleNDSArgs&& _ndsargs, UpdateConsoleGB
}


if ((!nds) || (consoletype != consoleType))
if ((!nds) || (consoletype != nds->ConsoleType))
{
NDS::Current = nullptr;
if (nds) delete nds;
Expand Down

0 comments on commit f261168

Please sign in to comment.