]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix a Mem_Free(NULL) warning
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 18 Oct 2010 07:29:44 +0000 (07:29 +0000)
committerRudolf Polzer <divverent@alientrap.org>
Mon, 18 Oct 2010 07:31:33 +0000 (09:31 +0200)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10549 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=f3bdca63d113feb80947b7a49c61c9525814306f

model_alias.c

index 2acd310e26cc22d5289c69fb9f04f1080457fbe3..f394a71b7af8b93022504f795df2fa10ecaf81c6 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;
        }