ref: ca2a6aee59f8bf0960cca15e8f8d681f92bb1f11
parent: f1a5a3b9998128d855706dbf8a1a41c9175b43f3
author: Simon Howard <fraggle@gmail.com>
date: Wed Apr 30 21:54:23 EDT 2014
opl: Fix crash when using OPL music. The previous change to add the poll method to the music module interface introduced a crash, as the OPL music struct does not define a poll method.
--- a/src/i_oplmusic.c
+++ b/src/i_oplmusic.c
@@ -1479,6 +1479,7 @@
I_OPL_PlaySong,
I_OPL_StopSong,
I_OPL_MusicIsPlaying,
+ NULL, // Poll
};
//----------------------------------------------------------------------
--- a/src/i_sound.c
+++ b/src/i_sound.c
@@ -279,7 +279,7 @@
sound_module->Update();
}
- if (music_module != NULL)
+ if (music_module != NULL && music_module->Poll != NULL)
{
music_module->Poll();
}