diff options
author | Jacques Lucke <jacques@blender.org> | 2020-04-09 12:59:24 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-04-09 12:59:24 +0300 |
commit | dabd59ba23f877f68aaf73e79f0d58118723d9b7 (patch) | |
tree | e5a161e9bfe31645e711350fa071ea470673c506 /source/blender/editors/space_outliner/outliner_select.c | |
parent | 43f895a59247ea4058cb3f019cd4dabd9ad9b0e4 (diff) | |
parent | 80255e67e30c4d77be64a5fa8dc68c0a55f39ebc (diff) |
Merge branch 'master' into functions
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_select.c')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_select.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c index ec1595eb930..64d86293fb7 100644 --- a/source/blender/editors/space_outliner/outliner_select.c +++ b/source/blender/editors/space_outliner/outliner_select.c @@ -312,6 +312,7 @@ static eOLDrawState tree_element_set_active_object(bContext *C, Scene *sce; Base *base; Object *ob = NULL; + TreeElement *te_ob = NULL; /* if id is not object, we search back */ if (te->idcode == ID_OB) { @@ -355,8 +356,12 @@ static eOLDrawState tree_element_set_active_object(bContext *C, } } - parent_tselem = TREESTORE(outliner_find_id(soops, &soops->tree, (ID *)ob)); - if (base) { + te_ob = outliner_find_id(soops, &soops->tree, (ID *)ob); + if (te_ob != NULL) { + parent_tselem = TREESTORE(te_ob); + } + + if (!ELEM(NULL, parent_tselem, base)) { if (set == OL_SETSEL_EXTEND) { /* swap select */ if (base->flag & BASE_SELECTED) { |