From 0ceff5a31db967c587f4e1655e30dc8f97ac6e50 Mon Sep 17 00:00:00 2001 From: Eukara Date: Fri, 23 Oct 2020 02:50:11 +0000 Subject: [PATCH] Fix QC adddecal() calls from crashing the engine when the affected model hasn't fully loaded. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5779 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/common/q1bsp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engine/common/q1bsp.c b/engine/common/q1bsp.c index d0c027c6d..4c3a60f2a 100644 --- a/engine/common/q1bsp.c +++ b/engine/common/q1bsp.c @@ -619,9 +619,9 @@ void Mod_ClipDecal(struct model_s *mod, vec3_t center, vec3_t normal, vec3_t tan sh_shadowframe++; - if (!mod || mod->loadstate != MLS_LOADED || mod->type != mod_brush) - { - } + if (!mod || mod->loadstate != MLS_LOADED) + return; + #ifdef Q1BSPS else if (mod->fromgame == fg_quake || mod->fromgame == fg_halflife) Q1BSP_ClipDecalToNodes(mod, &dec, mod->rootnode);