diff options
author | Sven Hesse | 2009-04-28 08:31:34 +0000 |
---|---|---|
committer | Sven Hesse | 2009-04-28 08:31:34 +0000 |
commit | f4c294a613499b4938e8c40344f0a29131795a1f (patch) | |
tree | b824416aa10eaadaf0af038bc8cceb6ba2ee8511 /engines | |
parent | 80a331423f68a76232a9a4163b1a6fea352d1a4b (diff) | |
download | scummvm-rg350-f4c294a613499b4938e8c40344f0a29131795a1f.tar.gz scummvm-rg350-f4c294a613499b4938e8c40344f0a29131795a1f.tar.bz2 scummvm-rg350-f4c294a613499b4938e8c40344f0a29131795a1f.zip |
Added a small safeguard to play()
svn-id: r40170
Diffstat (limited to 'engines')
-rw-r--r-- | engines/gob/batplayer.cpp | 3 | ||||
-rw-r--r-- | engines/gob/scnplayer.cpp | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/engines/gob/batplayer.cpp b/engines/gob/batplayer.cpp index 4cce68302f..563a1809d3 100644 --- a/engines/gob/batplayer.cpp +++ b/engines/gob/batplayer.cpp @@ -43,6 +43,9 @@ BATPlayer::~BATPlayer() { } bool BATPlayer::play(const char *fileName) { + if (!fileName) + return false; + debugC(1, kDebugDemo, "Playing BAT \"%s\"", fileName); init(); diff --git a/engines/gob/scnplayer.cpp b/engines/gob/scnplayer.cpp index 573243c768..bd42cee09f 100644 --- a/engines/gob/scnplayer.cpp +++ b/engines/gob/scnplayer.cpp @@ -43,6 +43,9 @@ SCNPlayer::~SCNPlayer() { } bool SCNPlayer::play(const char *fileName) { + if (!fileName) + return false; + debugC(1, kDebugDemo, "Playing SCN \"%s\"", fileName); init(); |