diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-04-16 20:40:57 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-04-16 20:42:24 +0300 |
commit | 0c495005dd83913864acb510c1d4194a2275dbb0 (patch) | |
tree | 07614e4ca6cb52f67a9326489775bc6da6c9a4c1 /source/blender/editors | |
parent | 45f04ba48a698439e7c4dd38901edc28bc2033a7 (diff) |
Fix multi-object edit crash
Border select assumed all objects had pose bones.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_select.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index 7e14aa0dbfa..56f69394765 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -2157,9 +2157,15 @@ static int do_object_pose_box_select(bContext *C, ViewContext *vc, rcti *rect, b if ((base->object->select_color & 0x0000FFFF) != (col[4] & 0x0000FFFF)) { break; } - const uint hit_bone = (col[4] & ~BONESEL_ANY) >> 16; - bPoseChannel *pchan = BLI_findlink(&base->object->pose->chanbase, hit_bone);; - bone = pchan ? pchan->bone : NULL; + + if ((base->object->pose != NULL) && bone_only) { + const uint hit_bone = (col[4] & ~BONESEL_ANY) >> 16; + bPoseChannel *pchan = BLI_findlink(&base->object->pose->chanbase, hit_bone);; + bone = pchan ? pchan->bone : NULL; + } + else { + bone = NULL; + } } } |