diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-06-23 15:46:58 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-06-23 15:46:58 +0400 |
commit | 08b5e5a492d5ac4097d814debb3c4520cb18e33d (patch) | |
tree | 1c2f306d072d80235f5042bd33648746cebabc22 /source/blender/editors/space_outliner/outliner.c | |
parent | 992a4e8e7a4da9e4f3f5dadbf996854da2bfd0bd (diff) |
fix for rare crash when a material is set in the outliner for an object with no material bits.
Diffstat (limited to 'source/blender/editors/space_outliner/outliner.c')
-rw-r--r-- | source/blender/editors/space_outliner/outliner.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c index aed8472b8d9..bcf186ad4e9 100644 --- a/source/blender/editors/space_outliner/outliner.c +++ b/source/blender/editors/space_outliner/outliner.c @@ -1927,7 +1927,8 @@ static int tree_element_active_material(bContext *C, Scene *scene, SpaceOops *so /* we search for the object parent */ ob= (Object *)outliner_search_back(soops, te, ID_OB); - if(ob==NULL || ob!=OBACT) return 0; // just paranoia + // note: ob->matbits can be NULL when a local object points to a library mesh. + if(ob==NULL || ob!=OBACT || ob->matbits==NULL) return 0; // just paranoia /* searching in ob mat array? */ tes= te->parent; |