From 316386b542ececff3f51bb1fb26ce72755157cbe Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Thu, 24 Jan 2002 02:44:19 +0000 Subject: [PATCH] mod->textures can legitimatly have null textures, so be on the lookout for them. This fixes the client crash on certain levels. --- libs/models/brush/gl_model_brush.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/models/brush/gl_model_brush.c b/libs/models/brush/gl_model_brush.c index 10a134eeb..086e8ff6e 100644 --- a/libs/models/brush/gl_model_brush.c +++ b/libs/models/brush/gl_model_brush.c @@ -77,6 +77,8 @@ Mod_LoadExternalTextures (model_t *mod) for (i = 0; i < mod->numtextures; i++) { tx = mod->textures[i]; + if (!tx) + continue; length = strlen (tx->name) - 1; // backslash at the end of texture name indicates external texture