diff options
Diffstat (limited to 'sdl.cpp')
-rw-r--r-- | sdl.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -499,7 +499,7 @@ MixerChannel *find_channel() { if (!mc->_sfx_sound) return mc; } - return mc; + return NULL; } @@ -514,6 +514,11 @@ bool isSfxFinished() { void playSfxSound(void *sound, uint32 size, uint rate) { MixerChannel *mc = find_channel(); + if (!mc) { + warning("No mixer channel available"); + return; + } + mc->_sfx_sound = sound; mc->_sfx_pos = 0; mc->_sfx_fp_speed = (1<<16) * rate / 22050; |