]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
check if model is NULL when doing trace checking
authorlordhavoc <lordhavoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 5 Feb 2002 15:22:07 +0000 (15:22 +0000)
committerlordhavoc <lordhavoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 5 Feb 2002 15:22:07 +0000 (15:22 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@1497 d7cf8633-e32d-0410-b094-e92efae38249

sv_main.c

index 7b9497b63d438221bf7da1a103acfc0f8b84b731..ff6f0fa5318f9665a633c29cd09fb96e8fe131d2 100644 (file)
--- a/sv_main.c
+++ b/sv_main.c
@@ -647,7 +647,7 @@ void SV_WriteEntitiesToClient (client_t *client, edict_t *clent, sizebuf_t *msg)
                        }
 
                        // don't try to cull embedded brush models with this, they're sometimes huge (spanning several rooms)
-                       if (sv_cullentities_trace.integer && (model->type != mod_brush || model->name[0] != '*'))
+                       if (sv_cullentities_trace.integer && (model == NULL || model->type != mod_brush || model->name[0] != '*'))
                        {
                                // LordHavoc: test random offsets, to maximize chance of detection
                                testorigin[0] = lhrandom(entmins[0], entmaxs[0]);