all repos — mgba @ 17e5b6a4553bd459ee5295585adb295cb72d65d8

mGBA Game Boy Advance Emulator

Qt: Fix fast forward crashing when no game loaded
Vicki Pfau vi@endrift.com
Mon, 25 Sep 2017 00:12:20 -0700
commit

17e5b6a4553bd459ee5295585adb295cb72d65d8

parent

883e7729f4071d868728e6574d21f84fcd646c49

1 files changed, 6 insertions(+), 2 deletions(-)

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

@@ -1167,9 +1167,13 @@

emulationMenu->addSeparator(); m_shortcutController->addFunctions(emulationMenu, [this]() { - m_controller->setFastForward(true); + if (m_controller) { + m_controller->setFastForward(true); + } }, [this]() { - m_controller->setFastForward(false); + if (m_controller) { + m_controller->setFastForward(false); + } }, QKeySequence(Qt::Key_Tab), tr("Fast forward (held)"), "holdFastForward"); QAction* turbo = new QAction(tr("&Fast forward"), emulationMenu);