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:
authorCampbell Barton <ideasman42@gmail.com>2016-02-23 16:31:46 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-02-23 16:32:52 +0300
commite8c24ee0d9262fe648f4bd8f13e1a2f1f88ae050 (patch)
tree40137e2538cc3b250c366c68cb6b7bb75d0ea0fc /source/blender/editors/sculpt_paint/paint_image.c
parent7a62fe316b878e152ed90c7aa26f7c67dceb4099 (diff)
Fix memory leak running project-paint from Python
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_image.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index 377ba3d020b..4d8255353f3 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -954,7 +954,6 @@ static int paint_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static int paint_exec(bContext *C, wmOperator *op)
{
- PaintOperation *pop;
PropertyRNA *strokeprop;
PointerRNA firstpoint;
float mouse[2];
@@ -966,18 +965,12 @@ static int paint_exec(bContext *C, wmOperator *op)
RNA_float_get_array(&firstpoint, "mouse", mouse);
- if (!(pop = texture_paint_init(C, op, mouse))) {
- return OPERATOR_CANCELLED;
- }
-
op->customdata = paint_stroke_new(C, op, NULL, paint_stroke_test_start,
paint_stroke_update_step,
paint_stroke_redraw,
paint_stroke_done, 0);
/* frees op->customdata */
- paint_stroke_exec(C, op);
-
- return OPERATOR_FINISHED;
+ return paint_stroke_exec(C, op);
}
void PAINT_OT_image_paint(wmOperatorType *ot)