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:
authorPhilipp Oeser <info@graphics-engineer.com>2019-10-02 15:40:58 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2019-10-02 15:59:11 +0300
commit31473070b3cfd28db1eccf39630edd87a69687f3 (patch)
tree6a0af13e4d6899fc1e258c5d7dc747d56b1b0d0f /source/blender/editors/sculpt_paint/paint_stroke.c
parent6b38c8a1ac1bb480446d133a6704de1c5ecd1e28 (diff)
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
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_stroke.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_stroke.c16
1 files changed, 10 insertions, 6 deletions
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);
}