Don't crash if unable to play cutscene music.

svn-id: r12566
This commit is contained in:
James Brown 2004-01-21 08:50:15 +00:00
parent 15a5fd20a3
commit 33d7e5a093

View File

@ -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) {