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:
authorAntony Riakiotakis <kalast@gmail.com>2013-04-16 18:00:18 +0400
committerAntony Riakiotakis <kalast@gmail.com>2013-04-16 18:00:18 +0400
commite39ea5f0a36b88da21fe6ddb09ebdf38399fe6a3 (patch)
tree6f5be32e4f2fcae69d0e7f5cb67b221f41009d22 /source/blender/blenkernel/intern/paint.c
parent18feb1630d1fbcd3f6e8d71c3a2c5fc44fc9e02b (diff)
Fix crash when no brush is active. Reported by Francesco Siddi, on irc
thanks!
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;
}