diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2018-11-28 16:38:12 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2018-11-29 16:28:43 +0300 |
commit | 3cc0eb36c3c05ac2661e2fac04c51db1bf0082b9 (patch) | |
tree | 97c73ac97504bba71b54486da002075019ee4f09 /source/blender/editors/space_view3d/view3d_gizmo_armature.c | |
parent | 28d2058e2c4801da4b4c60b2870deb13b535b1cc (diff) |
Fix T58068: gizmo crash for bone on a disabled armature layer
Maniphest Tasks: T58068
Differential Revision: https://developer.blender.org/D4004
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_gizmo_armature.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_gizmo_armature.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/space_view3d/view3d_gizmo_armature.c b/source/blender/editors/space_view3d/view3d_gizmo_armature.c index eea906620a6..4e91712491f 100644 --- a/source/blender/editors/space_view3d/view3d_gizmo_armature.c +++ b/source/blender/editors/space_view3d/view3d_gizmo_armature.c @@ -133,7 +133,8 @@ static bool WIDGETGROUP_armature_spline_poll(const bContext *C, wmGizmoGroupType if (ob != NULL) { const bArmature *arm = ob->data; if (arm->drawtype == ARM_B_BONE) { - if (arm->act_bone && arm->act_bone->segments > 1) { + bPoseChannel *pchan = BKE_pose_channel_active(ob); + if (pchan && pchan->bone->segments > 1) { View3D *v3d = CTX_wm_view3d(C); if ((v3d->flag2 & V3D_RENDER_OVERRIDE) || (v3d->gizmo_flag & (V3D_GIZMO_HIDE | V3D_GIZMO_HIDE_CONTEXT))) |