Fix T52538: Outliner crash when displaying groups and using Show Active on editmode bone not in any groups

There's no guaranty that given ID is found in current outliner tree...

Safe for 2.79, though not a regression.
This commit is contained in:
Bastien Montagne 2017-08-26 12:27:37 +02:00
parent 6f4a0c23cc
commit 42760d922e
1 changed files with 1 additions and 1 deletions

View File

@ -1092,7 +1092,7 @@ static int outliner_show_active_exec(bContext *C, wmOperator *UNUSED(op))
te = outliner_find_id(so, &so->tree, &obact->id);
if (obact->type == OB_ARMATURE) {
if (te != NULL && obact->type == OB_ARMATURE) {
/* traverse down the bone hierarchy in case of armature */
TreeElement *te_obact = te;