]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix a crash if a model has no vertices
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 6 Apr 2009 12:44:41 +0000 (12:44 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 6 Apr 2009 12:44:41 +0000 (12:44 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8874 d7cf8633-e32d-0410-b094-e92efae38249

model_alias.c

index 626ef113b2ddc641b983ddc9eaec76d8eb5fe0a2..dfb43c89f0d6d6ce63f1e79d3c00b9ae97fa21e8 100644 (file)
@@ -581,7 +581,8 @@ static void Mod_Alias_CalculateBoundingBox(void)
                                radius = dist;
                }
        }
-       Mem_Free(vertex3f);
+       if (vertex3f)
+               Mem_Free(vertex3f);
        radius = sqrt(radius);
        yawradius = sqrt(yawradius);
        loadmodel->yawmins[0] = loadmodel->yawmins[1] = -yawradius;