From: divverent Date: Mon, 18 Oct 2010 07:29:44 +0000 (+0000) Subject: fix a Mem_Free(NULL) warning X-Git-Tag: xonotic-v0.1.0preview~105 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=310a9406498dc7fb72198a1197391eecdc5f2b64;p=xonotic%2Fdarkplaces.git fix a Mem_Free(NULL) warning git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10549 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=f3bdca63d113feb80947b7a49c61c9525814306f --- diff --git a/model_alias.c b/model_alias.c index 2acd310e..f394a71b 100644 --- a/model_alias.c +++ b/model_alias.c @@ -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; }