Revision: 17140
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17140
Author:   broken
Date:     2008-10-21 04:04:29 +0200 (Tue, 21 Oct 2008)

Log Message:
-----------
* fixed a memory leak that was happening during preview render

Modified Paths:
--------------
    branches/sim_physics/source/blender/render/intern/source/volumetric.c

Modified: branches/sim_physics/source/blender/render/intern/source/volumetric.c
===================================================================
--- branches/sim_physics/source/blender/render/intern/source/volumetric.c       
2008-10-21 01:40:47 UTC (rev 17139)
+++ branches/sim_physics/source/blender/render/intern/source/volumetric.c       
2008-10-21 02:04:29 UTC (rev 17140)
@@ -913,8 +913,13 @@
                                i++;
                        
                                /* display progress every second */
-                               if(re->test_break())
+                               if(re->test_break()) {
+                                       if(tree) {
+                                               RE_ray_tree_free(tree);
+                                               tree= NULL;
+                                       }
                                        return;
+                               }
                                if(time-lasttime>1.0f) {
                                        char str[64];
                                        sprintf(str, "Precaching volume: %d%%", 
(int)(100.0f * (i / res_3f)));
@@ -937,11 +942,13 @@
                        }
                }
        }
-       
+
        if(tree) {
                RE_ray_tree_free(tree);
                tree= NULL;
        }
+       
+
 }
 
 /* loop through all objects (and their associated materials)


_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to