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.c25
1 files changed, 7 insertions, 18 deletions
diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c
index 90c07280a61..06844b09a9b 100644
--- a/source/blender/blenkernel/intern/paint.c
+++ b/source/blender/blenkernel/intern/paint.c
@@ -298,17 +298,13 @@ 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).
- *
- * \param pc The paint curve to free.
- * \param do_id_user When \a true, ID datablocks used (referenced) by this paint curve are 'released'
- * (their user count is decreased).
- */
-void BKE_paint_curve_free(PaintCurve *pc, const bool UNUSED(do_id_user))
+void BKE_paint_curve_free(PaintCurve *pc)
{
- MEM_SAFE_FREE(pc->points);
- pc->tot_points = 0;
+ if (pc->points) {
+ MEM_freeN(pc->points);
+ pc->points = NULL;
+ pc->tot_points = 0;
+ }
}
PaintCurve *BKE_paint_curve_add(Main *bmain, const char *name)
@@ -382,14 +378,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).
- *
- * \param palette The palette to free.
- * \param do_id_user When \a true, ID datablocks used (referenced) by this palette are 'released'
- * (their user count is decreased).
- */
-void BKE_palette_free(Palette *palette, const bool UNUSED(do_id_user))
+void BKE_palette_free(Palette *palette)
{
BLI_freelistN(&palette->colors);
}