diff options
author | Paul Gilbert | 2016-09-25 18:42:26 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-09-25 18:42:26 -0400 |
commit | de9e2499aee9912186ce020584210c9b0f6b6254 (patch) | |
tree | 28f96724ffb3e08fcc36e18b5bb2492617965730 /engines | |
parent | 8b282eff6c2895dba31bd744a537ff3998d4d8f2 (diff) | |
download | scummvm-rg350-de9e2499aee9912186ce020584210c9b0f6b6254.tar.gz scummvm-rg350-de9e2499aee9912186ce020584210c9b0f6b6254.tar.bz2 scummvm-rg350-de9e2499aee9912186ce020584210c9b0f6b6254.zip |
TITANIC: Fix crash using television channel buttons
Diffstat (limited to 'engines')
-rw-r--r-- | engines/titanic/core/game_object.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/titanic/core/game_object.cpp b/engines/titanic/core/game_object.cpp index a1427b131e..56c838995e 100644 --- a/engines/titanic/core/game_object.cpp +++ b/engines/titanic/core/game_object.cpp @@ -749,13 +749,13 @@ int CGameObject::playSound(const CString &name, CProximity &prox) { } CGameManager *gameManager = getGameManager(); - if (gameManager) { + if (gameManager && !name.empty()) { g_vm->_filesManager->preload(name); gameManager->_sound.playSound(name, prox); } - return 0; + return -1; } int CGameObject::queueSound(const CString &name, uint priorHandle, uint volume, int balance, bool repeated) { |