Qt: Fix crash when starting GDB stub after closing a game

This commit is contained in:
Jeffrey Pfau 2015-02-21 02:01:55 -08:00
parent 2235dcf2ab
commit 56475e578b
2 changed files with 3 additions and 2 deletions

View File

@ -42,6 +42,7 @@ Bugfixes:
- GBA: Fix savestate loading of DISPSTAT and WAITCNT registers - GBA: Fix savestate loading of DISPSTAT and WAITCNT registers
- Qt: Fix crash starting a GDB stub if a game isn't loaded - Qt: Fix crash starting a GDB stub if a game isn't loaded
- Qt: Fix crash when adjusting settings after closing a game - Qt: Fix crash when adjusting settings after closing a game
- Qt: Fix crash when starting GDB stub after closing a game
Misc: Misc:
- GBA Audio: Change internal audio sample buffer from 32-bit to 16-bit samples - GBA Audio: Change internal audio sample buffer from 32-bit to 16-bit samples
- GBA Memory: Simplify memory API and use fixed bus width - GBA Memory: Simplify memory API and use fixed bus width

View File

@ -170,11 +170,11 @@ ARMDebugger* GameController::debugger() {
void GameController::setDebugger(ARMDebugger* debugger) { void GameController::setDebugger(ARMDebugger* debugger) {
threadInterrupt(); threadInterrupt();
if (m_threadContext.debugger && GBAThreadHasStarted(&m_threadContext)) { if (m_threadContext.debugger && GBAThreadIsActive(&m_threadContext)) {
GBADetachDebugger(m_threadContext.gba); GBADetachDebugger(m_threadContext.gba);
} }
m_threadContext.debugger = debugger; m_threadContext.debugger = debugger;
if (m_threadContext.debugger && GBAThreadHasStarted(&m_threadContext)) { if (m_threadContext.debugger && GBAThreadIsActive(&m_threadContext)) {
GBAAttachDebugger(m_threadContext.gba, m_threadContext.debugger); GBAAttachDebugger(m_threadContext.gba, m_threadContext.debugger);
} }
threadContinue(); threadContinue();