2.5 Texture paint:
[blender.git] / source / blender / blenkernel / intern / scene.c
index dc1a55ed0eb525daf98cb9426f7292fe06a93647..8488d7ab2471f10b8cda7b63f1e4b22d29f380b4 100644 (file)
@@ -177,7 +177,7 @@ Scene *copy_scene(Main *bmain, Scene *sce, int type)
                                copy_paint(&ts->sculpt->paint, &ts->sculpt->paint);
                        }
 
-                       id_us_plus((ID *)ts->imapaint.brush);
+                       copy_paint(&ts->imapaint.paint, &ts->imapaint.paint);
                        ts->imapaint.paintcursor= NULL;
 
                        ts->particle.paintcursor= NULL;
@@ -284,7 +284,8 @@ void free_scene(Scene *sce)
                        free_paint(&sce->toolsettings->sculpt->paint);
                        MEM_freeN(sce->toolsettings->sculpt);
                }
-               
+               free_paint(&sce->toolsettings->imapaint.paint);
+
                MEM_freeN(sce->toolsettings);
                sce->toolsettings = NULL;       
        }