From d5fbc8c0f13d04d30638e782783d8fbfac78ffa0 Mon Sep 17 00:00:00 2001 From: Yamagi Burmeister Date: Sat, 17 Dec 2016 09:37:14 +0100 Subject: [PATCH] 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. --- src/g_func.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/g_func.c b/src/g_func.c index 4038663..42e24c7 100644 --- a/src/g_func.c +++ b/src/g_func.c @@ -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; }