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>2013-06-19 11:45:36 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-06-19 11:45:36 +0400
commitb3757069351ac5eab4e6c0e772f1cfbc83421c81 (patch)
tree450387d303ecd582a257cb47f3b5b05cbf0d6b1e /source/blender/editors/sculpt_paint
parent3c54d1b87a4a5190804fac3b2539e3930b346e6c (diff)
fix [#35793] Crash When Painting Gradient Weight
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index 1ff7df3b041..181b32d58fc 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -2145,7 +2145,7 @@ struct WPaintData {
};
/* ensure we have data on wpaint start, add if needed */
-static int wpaint_ensure_data(bContext *C, wmOperator *op)
+static bool wpaint_ensure_data(bContext *C, wmOperator *op)
{
Scene *scene = CTX_data_scene(C);
Object *ob = CTX_data_active_object(C);
@@ -3390,6 +3390,10 @@ static int paint_weight_gradient_exec(bContext *C, wmOperator *op)
vert_cache = gesture->userdata;
}
else {
+ if (wpaint_ensure_data(C, op) == FALSE) {
+ return OPERATOR_CANCELLED;
+ }
+
data.is_init = true;
vert_cache = MEM_mallocN(sizeof(DMGradient_vertStore) * me->totvert, __func__);
}