diff options
author | Johannes Schickel | 2009-05-18 23:14:37 +0000 |
---|---|---|
committer | Johannes Schickel | 2009-05-18 23:14:37 +0000 |
commit | 2f72831876f6cd5cc94ddcfa5742886059c784fc (patch) | |
tree | de03549da6c76b0bb9a85858c7bdf623501da2da /engines | |
parent | 90b4afd41b834f90520eebefcb9f6e332bacc546 (diff) | |
download | scummvm-rg350-2f72831876f6cd5cc94ddcfa5742886059c784fc.tar.gz scummvm-rg350-2f72831876f6cd5cc94ddcfa5742886059c784fc.tar.bz2 scummvm-rg350-2f72831876f6cd5cc94ddcfa5742886059c784fc.zip |
Don't crash on debugger shortcut when no debugger is present. (Fixes crash in LoL, when the user tries to press Ctrl+d)
svn-id: r40709
Diffstat (limited to 'engines')
-rw-r--r-- | engines/kyra/kyra_v1.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/engines/kyra/kyra_v1.cpp b/engines/kyra/kyra_v1.cpp index 2ad6d54bc1..d6e0a124d4 100644 --- a/engines/kyra/kyra_v1.cpp +++ b/engines/kyra/kyra_v1.cpp @@ -254,10 +254,12 @@ int KyraEngine_v1::checkInput(Button *buttonList, bool mainLoop) { saveGameState(saveLoadSlot, savegameName, 0); } } else if (event.kbd.flags == Common::KBD_CTRL) { - if (event.kbd.keycode == 'd') - _debugger->attach(); - else if (event.kbd.keycode == 'q') + if (event.kbd.keycode == 'd') { + if (_debugger) + _debugger->attach(); + } else if (event.kbd.keycode == 'q') { quitGame(); + } } else { switch(event.kbd.keycode) { case Common::KEYCODE_SPACE: |