mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-18 18:01:13 +00:00
don't try to release an sfx when the cache has been flushed: our held sfx gets ripped out from underneath us.
This commit is contained in:
parent
e6c4817c92
commit
54139a1742
1 changed files with 4 additions and 1 deletions
|
@ -106,7 +106,10 @@ SND_CacheRelease (sfx_t *sfx)
|
|||
{
|
||||
sfxblock_t *block = (sfxblock_t *) sfx->data;
|
||||
block->buffer = 0;
|
||||
Cache_Release (&block->cache);
|
||||
// due to the possibly asynchronous nature of the mixer, the cache
|
||||
// may have been flushed behind our backs
|
||||
if (block->cache.data)
|
||||
Cache_Release (&block->cache);
|
||||
}
|
||||
|
||||
sfxbuffer_t *
|
||||
|
|
Loading…
Reference in a new issue