* Fix crashes due to failing to call the callback when sounds are removed from the queue/list

Part of patch #887 by Buginator


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3105 4a71c877-e1ca-e34f-864e-861f7616d084
master
Giel van Schijndel 2007-12-18 23:25:32 +00:00
parent 41c602ca60
commit 29139cc6da
1 changed files with 3 additions and 0 deletions

View File

@ -235,6 +235,9 @@ void sound_Update()
err = sound_GetError(); err = sound_GetError();
if (err != AL_NO_ERROR) if (err != AL_NO_ERROR)
{ {
// Make sure to invoke the "finished" callback
sound_FinishedCallback(node->curr);
// Destroy this object and move to the next object // Destroy this object and move to the next object
sound_DestroyIteratedSample(&previous, &node); sound_DestroyIteratedSample(&previous, &node);
continue; continue;