mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-25 22:10:59 +00:00
Fix a rare crash by nullpointer
This commit is contained in:
parent
1d6872caa7
commit
77de60f274
1 changed files with 6 additions and 0 deletions
|
@ -607,6 +607,12 @@ S_IssuePlaysound ( playsound_t *ps )
|
|||
|
||||
ch->pos = 0;
|
||||
sc = S_LoadSound( ch->sfx );
|
||||
|
||||
if (!sc)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ch->end = paintedtime + sc->length;
|
||||
|
||||
/* free the playsound */
|
||||
|
|
Loading…
Reference in a new issue