Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenkernel/intern/paint.c')
-rw-r--r--source/blender/blenkernel/intern/paint.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c
index 3a2663c5d48..8c1502643c5 100644
--- a/source/blender/blenkernel/intern/paint.c
+++ b/source/blender/blenkernel/intern/paint.c
@@ -298,13 +298,11 @@ void BKE_paint_brush_set(Paint *p, Brush *br)
}
}
+/** Free (or release) any data used by this paint curve (does not free the pcurve itself). */
void BKE_paint_curve_free(PaintCurve *pc)
{
- if (pc->points) {
- MEM_freeN(pc->points);
- pc->points = NULL;
- pc->tot_points = 0;
- }
+ MEM_SAFE_FREE(pc->points);
+ pc->tot_points = 0;
}
PaintCurve *BKE_paint_curve_add(Main *bmain, const char *name)
@@ -378,6 +376,7 @@ Palette *BKE_palette_add(Main *bmain, const char *name)
return palette;
}
+/** Free (or release) any data used by this palette (does not free the palette itself). */
void BKE_palette_free(Palette *palette)
{
BLI_freelistN(&palette->colors);
@@ -493,8 +492,6 @@ void BKE_paint_init(Scene *sce, PaintMode mode, const char col[3])
void BKE_paint_free(Paint *paint)
{
- id_us_min((ID *)paint->brush);
- id_us_min((ID *)paint->palette);
curvemapping_free(paint->cavity_curve);
}