From 39e1ccc50623f576d668018c5051ec52c6af4af5 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Wed, 14 Mar 2012 16:08:48 +0900 Subject: [PATCH] Don't try to process skins in GL without a player model. If the client receives a skin updated message from the server before having loaded the player model (shouldn't happen, but some servers have very strange programmers), no skin data is avaible for updating, so just bail out. --- libs/models/gl_skin.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/models/gl_skin.c b/libs/models/gl_skin.c index 3e8410e84..e43f710ce 100644 --- a/libs/models/gl_skin.c +++ b/libs/models/gl_skin.c @@ -184,6 +184,8 @@ build_skin (skin_t *skin, int cmap) s = skins + cmap; if (!s->tex) s = &player_skin; + if (!s->tex) // we haven't loaded the player model yet + return; texnum = skin_textures + cmap; fb_texnum = 0; if (s->fb)