diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-08-03 21:53:41 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-08-03 21:53:41 +0400 |
commit | 2a8d76d7342b0064284075bb5b88d964eda32e87 (patch) | |
tree | 80ddb787fb51929ab80b9863710cb1a19ce27cb9 /source/blender/makesrna/intern/rna_gpencil.c | |
parent | 5f72462e38e940a0e1e03ee682d159c1aabbc309 (diff) |
add versions of MEM_reallocN, MEM_recallocN which take a string arg so new allocs have an ID, changing existing functions signatures would be too disruptive at the moment.
Diffstat (limited to 'source/blender/makesrna/intern/rna_gpencil.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_gpencil.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c index efe6c08cafe..439bc51896f 100644 --- a/source/blender/makesrna/intern/rna_gpencil.c +++ b/source/blender/makesrna/intern/rna_gpencil.c @@ -118,11 +118,9 @@ static void rna_GPencilLayer_info_set(PointerRNA *ptr, const char *value) static void rna_GPencil_stroke_point_add(bGPDstroke *stroke, int count) { if (count > 0) { - if (stroke->points == NULL) - stroke->points = MEM_callocN(sizeof(bGPDspoint) * count, "gp_stroke_points"); - else - stroke->points = MEM_recallocN(stroke->points, sizeof(bGPDspoint) * (stroke->totpoints + count)); - + stroke->points = MEM_recallocN_id(stroke->points, + sizeof(bGPDspoint) * (stroke->totpoints + count), + "gp_stroke_points"); stroke->totpoints += count; } } |