fix for missing NULL check with brush poll, reported by Mike S.
authorCampbell Barton <ideasman42@gmail.com>
Fri, 5 Nov 2010 02:42:33 +0000 (02:42 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 5 Nov 2010 02:42:33 +0000 (02:42 +0000)
source/blender/makesrna/intern/rna_sculpt_paint.c

index 0fe3972104ee10699429df25f8de80a578d27d24..8f83e0b39a40fb6880a29a48a1998b1cb6ff5b61 100644 (file)
@@ -167,7 +167,7 @@ static int rna_Brush_mode_poll(PointerRNA *ptr, PointerRNA value)
         * but for 2D view image painting we always want texture brushes 
         * this is not quite correct since you could be in object weightpaint
         * mode at the same time as the 2D image view, but for now its *good enough* */
-       if(ob->mode & OB_MODE_ALL_PAINT) {
+       if(ob && ob->mode & OB_MODE_ALL_PAINT) {
                return ob->mode & brush->ob_mode;
        }
        else {