From 33d7e5a093e807e0e3b127342609471f3a903404 Mon Sep 17 00:00:00 2001 From: James Brown Date: Wed, 21 Jan 2004 08:50:15 +0000 Subject: Don't crash if unable to play cutscene music. svn-id: r12566 --- sword1/animation.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sword1') 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) { -- cgit v1.2.3