mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-21 18:01:15 +00:00
plug a potential channel leak
This commit is contained in:
parent
522b069433
commit
3bc7921a99
1 changed files with 3 additions and 1 deletions
|
@ -600,8 +600,10 @@ SND_StartSound (int entnum, int entchannel, sfx_t *sfx, const vec3_t origin,
|
|||
for (check = looped_dynamic_channels; check; check = check->next)
|
||||
if (snd_check_channels (target_chan, check, osfx))
|
||||
break;
|
||||
if (!osfx->retain (osfx))
|
||||
if (!osfx->retain (osfx)) {
|
||||
SND_ChannelStop (target_chan);
|
||||
return; // couldn't load the sound's data
|
||||
}
|
||||
target_chan->sfx = osfx;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue