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:
Diffstat (limited to 'source/blender/blenkernel/intern/paint.c')
-rw-r--r--source/blender/blenkernel/intern/paint.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c
index ad7ac2a046b..402aebdfed4 100644
--- a/source/blender/blenkernel/intern/paint.c
+++ b/source/blender/blenkernel/intern/paint.c
@@ -64,6 +64,9 @@ void BKE_paint_invalidate_overlay_tex (Scene *scene, const Tex *tex)
Paint *p = BKE_paint_get_active(scene);
Brush *br = p->brush;
+ if (!br)
+ return;
+
if (br->mtex.tex == tex)
overlay_flags |= PAINT_INVALID_OVERLAY_TEXTURE_PRIMARY;
if (br->mask_mtex.tex == tex)
@@ -75,7 +78,7 @@ void BKE_paint_invalidate_cursor_overlay (Scene *scene, CurveMapping *curve)
Paint *p = BKE_paint_get_active(scene);
Brush *br = p->brush;
- if (br->curve == curve)
+ if (br && br->curve == curve)
overlay_flags |= PAINT_INVALID_OVERLAY_CURVE;
}