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:
authorJacques Lucke <jacques@blender.org>2022-04-03 11:49:20 +0300
committerJacques Lucke <jacques@blender.org>2022-04-03 11:49:20 +0300
commit1cdf8b19e5885c26f7341a0c21d243401a89d50e (patch)
tree8b2a37220a371a105e125908bbf91b9fd87a9dcb /source/blender/editors/sculpt_paint/paint_vertex.c
parentbe699936af7b86ae542f7cc73caf56ab9de350d3 (diff)
Fix T96957: creating paint curve crashes
This was essentially double free due to a dangling pointer, because `op->customdata` was not properly set to null after the paint stroke was freed.
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_vertex.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index c4d80d38100..3f0f97dffd2 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -2596,7 +2596,7 @@ static void wpaint_cancel(bContext *C, wmOperator *op)
static int wpaint_modal(bContext *C, wmOperator *op, const wmEvent *event)
{
- return paint_stroke_modal(C, op, event, op->customdata);
+ return paint_stroke_modal(C, op, event, (struct PaintStroke **)&op->customdata);
}
void PAINT_OT_weight_paint(wmOperatorType *ot)
@@ -3551,7 +3551,7 @@ static void vpaint_cancel(bContext *C, wmOperator *op)
static int vpaint_modal(bContext *C, wmOperator *op, const wmEvent *event)
{
- return paint_stroke_modal(C, op, event, op->customdata);
+ return paint_stroke_modal(C, op, event, (struct PaintStroke **)&op->customdata);
}
void PAINT_OT_vertex_paint(wmOperatorType *ot)