From 310a9406498dc7fb72198a1197391eecdc5f2b64 Mon Sep 17 00:00:00 2001 From: divverent Date: Mon, 18 Oct 2010 07:29:44 +0000 Subject: [PATCH] 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 --- model_alias.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- 2.39.2