diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-04-14 11:24:17 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-04-14 11:25:25 +0300 |
commit | 825b015e9218810ae2011df6cf4b67920ad9295d (patch) | |
tree | d988ee24453c3523be7e759025fc34f077c323c8 /source/blender/editors/space_outliner/outliner_select.c | |
parent | 8486ee39bd689f8659cf90cc6942560225de7527 (diff) |
Fix T44348: Blender crashes when selecting bone from inactive scene in outliner
Pose is not guaranteed to be existing in object, so can't be used for selection
flag clear. Use bones themselves for that.
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_select.c')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_select.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c index 6050b66fdb7..e52c68b57e9 100644 --- a/source/blender/editors/space_outliner/outliner_select.c +++ b/source/blender/editors/space_outliner/outliner_select.c @@ -554,10 +554,12 @@ static eOLDrawState tree_element_active_bone( Object *ob = OBACT; if (ob) { if (set != OL_SETSEL_EXTEND) { - bPoseChannel *pchannel; /* single select forces all other bones to get unselected */ - for (pchannel = ob->pose->chanbase.first; pchannel; pchannel = pchannel->next) - pchannel->bone->flag &= ~(BONE_TIPSEL | BONE_SELECTED | BONE_ROOTSEL); + Bone *bone; + for (bone = arm->bonebase.first; bone != NULL; bone = bone->next) { + bone->flag &= ~(BONE_TIPSEL | BONE_SELECTED | BONE_ROOTSEL); + do_outliner_bone_select_recursive(arm, bone, false); + } } } |