Do not play invalid sfx
This commit is contained in:
1 parent
667c67a61a
commit
4686e8e112
1 file changed
+8
@@ -586,6 +586,14 @@ void S_StartSoundAtVolume(const void *origin_p, sfxenum_t sfx_id, INT32 volume)
|
||||
if (!sfx->data)
|
||||
{
|
||||
sfx->data = I_GetSfx(sfx);
|
||||
|
||||
if (!sfx->data)
|
||||
{
|
||||
CONS_Alert(CONS_WARNING,
|
||||
"Tried to load invalid sfx_%s\n",
|
||||
sfx->name);
|
||||
return;/* don't play it */
|
||||
}
|
||||
}
|
||||
|
||||
// Avoid channel reverse if surround
|
||||
|
||||
Reference in new issue
Block a user