In Move_Calc() and AngleMove_Calc() add a sanity check to *func.

This is the same as in baseq2 and xatrix. This was reported by maraakate
in yquake2 issue #160.
This commit is contained in:
Yamagi Burmeister 2016-12-17 09:37:14 +01:00
parent 23cbffbd39
commit d5fbc8c0f1

View file

@ -157,7 +157,7 @@ Move_Begin(edict_t *ent)
void
Move_Calc(edict_t *ent, vec3_t dest, void (*func)(edict_t *))
{
if (!ent)
if (!ent || !func)
{
return;
}
@ -303,7 +303,7 @@ AngleMove_Begin(edict_t *ent)
void
AngleMove_Calc(edict_t *ent, void (*func)(edict_t *))
{
if (!ent)
if (!ent || !func)
{
return;
}