diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/titanic/main_game_window.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/titanic/main_game_window.cpp b/engines/titanic/main_game_window.cpp index 53539d84a5..053712d412 100644 --- a/engines/titanic/main_game_window.cpp +++ b/engines/titanic/main_game_window.cpp @@ -336,8 +336,10 @@ void CMainGameWindow::keyDown(Common::KeyState keyState) { } else if (keyState.keycode == Common::KEYCODE_c && (keyState.flags & Common::KBD_CTRL)) { // Cheat action - CViewItem *newView = _project->parseView("Cheat Room.Node 1.Cheat Rooms View"); - _gameManager->_gameState.changeView(newView, nullptr); + if (_project && g_vm->canLoadGameStateCurrently()) { + CViewItem *newView = _project->parseView("Cheat Room.Node 1.Cheat Rooms View"); + _gameManager->_gameState.changeView(newView, nullptr); + } } else if (_inputAllowed) { _gameManager->_inputTranslator.keyDown(keyState); |