From 3cc0eb36c3c05ac2661e2fac04c51db1bf0082b9 Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Wed, 28 Nov 2018 14:38:12 +0100 Subject: Fix T58068: gizmo crash for bone on a disabled armature layer Maniphest Tasks: T58068 Differential Revision: https://developer.blender.org/D4004 --- source/blender/editors/space_view3d/view3d_gizmo_armature.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source') 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))) -- cgit v1.2.3