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_image_ops_paint.cc
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_image_ops_paint.cc')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_ops_paint.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image_ops_paint.cc b/source/blender/editors/sculpt_paint/paint_image_ops_paint.cc
index 786fcc47526..8ddf1614e41 100644
--- a/source/blender/editors/sculpt_paint/paint_image_ops_paint.cc
+++ b/source/blender/editors/sculpt_paint/paint_image_ops_paint.cc
@@ -497,7 +497,7 @@ static int paint_exec(bContext *C, wmOperator *op)
static int paint_modal(bContext *C, wmOperator *op, const wmEvent *event)
{
- return paint_stroke_modal(C, op, event, static_cast<PaintStroke *>(op->customdata));
+ return paint_stroke_modal(C, op, event, reinterpret_cast<PaintStroke **>(&op->customdata));
}
static void paint_cancel(bContext *C, wmOperator *op)