]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_rmain.c
fixed bug where animated mdl skins (such as Tomaz's health box and
[xonotic/darkplaces.git] / gl_rmain.c
index b3294517c45a9572cf190441ad492c6323a8150a..088e3bf0e6bbce03e45f57a7cff9ca83550f1c29 100644 (file)
@@ -1055,6 +1055,8 @@ void R_SkinFrame_PrepareForPurge(void)
 
 void R_SkinFrame_MarkUsed(skinframe_t *skinframe)
 {
+       if (!skinframe)
+               return;
        // mark the skinframe as used for the purging code
        skinframe->loadsequence = r_skinframe.loadsequence;
 }
@@ -3252,7 +3254,7 @@ void R_UpdateAllTextureInfo(entity_render_t *ent)
 {
        int i;
        if (ent->model)
-               for (i = 0;i < ent->model->num_textures;i++)
+               for (i = 0;i < ent->model->num_texturesperskin;i++)
                        R_UpdateTextureInfo(ent, ent->model->data_textures + i);
 }