fix a Mem_Free(NULL) warning
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 18 Oct 2010 07:29:44 +0000 (07:29 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 18 Oct 2010 07:29:44 +0000 (07:29 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10549 d7cf8633-e32d-0410-b094-e92efae38249

model_alias.c

index 2acd310..f394a71 100644 (file)
@@ -53,7 +53,8 @@ void *Mod_Skeletal_AnimateVertices_AllocBuffers(size_t nbytes)
 {
        if(Mod_Skeltal_AnimateVertices_maxbonepose < nbytes)
        {
-               Mem_Free(Mod_Skeltal_AnimateVertices_bonepose);
+               if(Mod_Skeltal_AnimateVertices_bonepose)
+                       Mem_Free(Mod_Skeltal_AnimateVertices_bonepose);
                Mod_Skeltal_AnimateVertices_bonepose = Z_Malloc(nbytes);
                Mod_Skeltal_AnimateVertices_maxbonepose = nbytes;
        }