aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/titanic/core/game_object.cpp4
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) {