diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-08-22 14:17:31 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-08-22 14:17:31 +0400 |
commit | 4e4b7971657b5211984989ccf3068cf9518a8e1c (patch) | |
tree | 602636f4001559a7998365772afb83c424b2e8b6 /source/blender/editors | |
parent | de35361b11c6f0a9f7082184cc9b337b60686ac7 (diff) |
Fix #23431: crash in brush icon preview when there is no active object.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/interface/interface_icons.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index 3ba7c654210..499c676bf6f 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -1027,11 +1027,11 @@ static int ui_id_brush_get_icon(bContext *C, ID *id, int preview) EnumPropertyItem *items; int tool; - if(ob->mode & OB_MODE_SCULPT) { + if(ob && (ob->mode & OB_MODE_SCULPT)) { items = brush_sculpt_tool_items; tool = br->sculpt_tool; } - else if(ob->mode & (OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT)) { + else if(ob && (ob->mode & (OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT))) { items = brush_vertexpaint_tool_items; tool = br->vertexpaint_tool; } |