all repos — mgba @ e82c050a7d33c0d2df3935a7e7b41f95a8c9175e

mGBA Game Boy Advance Emulator

Qt: Fix attempting to rewind when game isn't loaded
Jeffrey Pfau jeffrey@endrift.com
Mon, 29 Aug 2016 13:38:11 -0700
commit

e82c050a7d33c0d2df3935a7e7b41f95a8c9175e

parent

1462ffe7d5482fbee9d8c3f040f5304093ed5484

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

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

@@ -640,7 +640,7 @@ emit rewound(&m_threadContext);

} void GameController::startRewinding() { - if (!m_gameOpen) { + if (!isLoaded()) { return; } if (m_multiplayer && m_multiplayer->attached() > 1) {

@@ -654,6 +654,9 @@ mCoreThreadSetRewinding(&m_threadContext, true);

} void GameController::stopRewinding() { + if (!isLoaded()) { + return; + } mCoreThreadSetRewinding(&m_threadContext, false); bool signalsBlocked = blockSignals(true); setPaused(m_wasPaused);