aboutsummaryrefslogtreecommitdiff
path: root/sword1
diff options
context:
space:
mode:
authorJames Brown2004-01-21 08:50:15 +0000
committerJames Brown2004-01-21 08:50:15 +0000
commit33d7e5a093e807e0e3b127342609471f3a903404 (patch)
tree6111e99bd7ce99d6cd7325ab144ac19984a2fb50 /sword1
parent15a5fd20a3e3d7328512fe64102ed75f3c50fc87 (diff)
downloadscummvm-rg350-33d7e5a093e807e0e3b127342609471f3a903404.tar.gz
scummvm-rg350-33d7e5a093e807e0e3b127342609471f3a903404.tar.bz2
scummvm-rg350-33d7e5a093e807e0e3b127342609471f3a903404.zip
Don't crash if unable to play cutscene music.
svn-id: r12566
Diffstat (limited to 'sword1')
-rw-r--r--sword1/animation.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/sword1/animation.cpp b/sword1/animation.cpp
index 5c8b8d6ae6..9c0661ee2d 100644
--- a/sword1/animation.cpp
+++ b/sword1/animation.cpp
@@ -308,7 +308,7 @@ bool AnimationState::decodeFrame() {
*/
#ifdef BACKEND_8BIT
- if (checkPaletteSwitch() || (bgSoundStream == 0) ||
+ if (checkPaletteSwitch() || (bgSoundStream == NULL) ||
(bgSoundStream->getSamplesPlayed()*12/bgSoundStream->getRate()) < (framenum+3)){
_scr->plotYUV(lut, sequence_i->width, sequence_i->height, info->display_fbuf->buf);
@@ -330,7 +330,7 @@ bool AnimationState::decodeFrame() {
#else
- if ((bgSoundStream->getSamplesPlayed()*12/bgSoundStream->getRate()) < (framenum+3)){
+ if ((bgSoundStream == NULL) || (bgSoundStream->getSamplesPlayed()*12/bgSoundStream->getRate()) < (framenum+3)){
plotYUV(lookup2, sequence_i->width, sequence_i->height, info->display_fbuf->buf);
if (bgSoundStream) {