diff options
-rw-r--r-- | source/blender/makesrna/intern/rna_sculpt_paint.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c index 0fe3972104e..8f83e0b39a4 100644 --- a/source/blender/makesrna/intern/rna_sculpt_paint.c +++ b/source/blender/makesrna/intern/rna_sculpt_paint.c @@ -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 { |