[Bf-blender-cvs] [31473070b3c] master: Fix T70443: Crash on sculpting with 'Curve' Stroke Method
Philipp Oeser
noreply at git.blender.org
Wed Oct 2 15:00:08 CEST 2019
Commit: 31473070b3cfd28db1eccf39630edd87a69687f3
Author: Philipp Oeser
Date: Wed Oct 2 14:40:58 2019 +0200
Branches: master
https://developer.blender.org/rB31473070b3cfd28db1eccf39630edd87a69687f3
Fix T70443: Crash on sculpting with 'Curve' Stroke Method
Caused by rBc31a849a1474.
Reviewed By: brecht
Maniphest Tasks: T70443
Differential Revision: https://developer.blender.org/D5970
===================================================================
M source/blender/editors/sculpt_paint/paint_stroke.c
===================================================================
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c
index d8be345cc84..c1aabbfafcf 100644
--- a/source/blender/editors/sculpt_paint/paint_stroke.c
+++ b/source/blender/editors/sculpt_paint/paint_stroke.c
@@ -909,16 +909,21 @@ PaintStroke *paint_stroke_new(bContext *C,
void paint_stroke_free(bContext *C, wmOperator *op)
{
RegionView3D *rv3d = CTX_wm_region_view3d(C);
+ if (rv3d) {
+ rv3d->rflag &= ~RV3D_PAINTING;
+ }
+
+ BKE_paint_set_overlay_override(0);
+
PaintStroke *stroke = op->customdata;
- UnifiedPaintSettings *ups = stroke->ups;
+ if (stroke == NULL) {
+ return;
+ }
+ UnifiedPaintSettings *ups = stroke->ups;
ups->draw_anchored = false;
ups->stroke_active = false;
- if (rv3d) {
- rv3d->rflag &= ~RV3D_PAINTING;
- }
-
if (stroke->timer) {
WM_event_remove_timer(CTX_wm_manager(C), CTX_wm_window(C), stroke->timer);
}
@@ -933,7 +938,6 @@ void paint_stroke_free(bContext *C, wmOperator *op)
BLI_freelistN(&stroke->line);
- BKE_paint_set_overlay_override(0);
MEM_SAFE_FREE(op->customdata);
}
More information about the Bf-blender-cvs
mailing list