Add an error check to patch #1082: Fix AL_INVALID_NAME bug, to catch the
currently impossible case of the sample not being in the active list. git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5425 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
4f07f76034
commit
4d1d5b4c11
|
@ -375,6 +375,8 @@ BOOL sound_QueueSamplePlaying( void )
|
|||
if (node->curr->iSample == current_queue_sample)
|
||||
{
|
||||
sound_DestroyIteratedSample(&previous, &node);
|
||||
current_queue_sample = AL_INVALID;
|
||||
return false;
|
||||
}
|
||||
previous = node;
|
||||
if (node)
|
||||
|
@ -382,6 +384,7 @@ BOOL sound_QueueSamplePlaying( void )
|
|||
node = node->next;
|
||||
}
|
||||
}
|
||||
debug(LOG_ERROR, "Sample %u not deleted because it wasn't in the active queue!", current_queue_sample);
|
||||
current_queue_sample = AL_INVALID;
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue