aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/sfx
diff options
context:
space:
mode:
authorAndre Heider2009-03-05 21:50:01 +0000
committerAndre Heider2009-03-05 21:50:01 +0000
commit7ef3a59a2cbea1046c31161e3a37a89ed0252dce (patch)
tree5cb48329cf8a39c940f5d733a1cea21b60440a39 /engines/sci/sfx
parente75178f383edd20ad8ab1b74dead78b2199f9476 (diff)
downloadscummvm-rg350-7ef3a59a2cbea1046c31161e3a37a89ed0252dce.tar.gz
scummvm-rg350-7ef3a59a2cbea1046c31161e3a37a89ed0252dce.tar.bz2
scummvm-rg350-7ef3a59a2cbea1046c31161e3a37a89ed0252dce.zip
don't crash if sound has been disabled or the backend driver failed to initialize.
svn-id: r39137
Diffstat (limited to 'engines/sci/sfx')
-rw-r--r--engines/sci/sfx/player/polled.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/sci/sfx/player/polled.cpp b/engines/sci/sfx/player/polled.cpp
index 58322f4aa7..4d01e3fcfb 100644
--- a/engines/sci/sfx/player/polled.cpp
+++ b/engines/sci/sfx/player/polled.cpp
@@ -282,6 +282,9 @@ static int pp_set_option(char *name, char *value) {
}
static int pp_init(ResourceManager *resmgr, int expected_latency) {
+ if (!g_system->getMixer()->isReady())
+ return SFX_ERROR;
+
Resource *res = NULL, *res2 = NULL;
/* FIXME Temporary hack to detect Amiga games. */