diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-06-04 11:44:57 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-06-04 11:44:57 +0400 |
commit | 1511bd8eb47fdbd37af065ee4d06d499fa8a68b6 (patch) | |
tree | d8fe9d132f4fe0e8336869fb4e43ab8c1fcc0a4e /source | |
parent | eb811920692551995526b6449ef618e70de8981d (diff) |
Correction to recent changes in paint module -- missed NULL check for active object
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/paint.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c index 25553448306..f7e3e103e99 100644 --- a/source/blender/blenkernel/intern/paint.c +++ b/source/blender/blenkernel/intern/paint.c @@ -106,7 +106,7 @@ Paint *paint_get_active_from_context(const bContext *C) return &ts->imapaint.paint; } } - else { + else if (obact) { switch (obact->mode) { case OB_MODE_SCULPT: return &ts->sculpt->paint; @@ -122,7 +122,8 @@ Paint *paint_get_active_from_context(const bContext *C) else return &ts->imapaint.paint; } - + } + else { /* default to image paint */ return &ts->imapaint.paint; } |