PARANOIA: I_Error if mobj hook is called with MT_NULL

This commit is contained in:
James R 2022-02-01 02:27:27 -08:00
parent ff57a983d7
commit 0a0c17da7c

View file

@ -347,6 +347,10 @@ static boolean prepare_mobj_hook
int hook_type,
mobjtype_t mobj_type
){
#ifdef PARANOIA
if (mobj_type == MT_NULL)
I_Error("MT_NULL has been passed to a mobj hook\n");
#endif
return init_hook_type(hook, default_status,
hook_type, mobj_type, NULL,
mobj_hook_available(hook_type, mobj_type));