2.5/Sculpt:
authorNicholas Bishop <nicholasbishop@gmail.com>
Mon, 17 Aug 2009 17:49:33 +0000 (17:49 +0000)
committerNicholas Bishop <nicholasbishop@gmail.com>
Mon, 17 Aug 2009 17:49:33 +0000 (17:49 +0000)
* Fixed a mem leak with the grab brush

source/blender/editors/sculpt_paint/sculpt.c

index 9931ae15f237d500e65f7d6b9405c20dcc062b59..43d70cfcf7a5973c1688a40defe0f18b540de826 100644 (file)
@@ -1191,12 +1191,15 @@ static float unproject_brush_radius(SculptSession *ss, float offset)
 
 static void sculpt_cache_free(StrokeCache *cache)
 {
+       int i;
        if(cache->orig_norms)
                MEM_freeN(cache->orig_norms);
        if(cache->face_norms)
                MEM_freeN(cache->face_norms);
        if(cache->mats)
                MEM_freeN(cache->mats);
+       for(i = 0; i < 8; ++i) 
+               BLI_freelistN(&cache->grab_active_verts[i]);
        MEM_freeN(cache);
 }