[Bf-blender-cvs] [3cc0eb36c3c] blender2.8: Fix T58068: gizmo crash for bone on a disabled armature layer

Philipp Oeser noreply at git.blender.org
Thu Nov 29 14:31:14 CET 2018


Commit: 3cc0eb36c3c05ac2661e2fac04c51db1bf0082b9
Author: Philipp Oeser
Date:   Wed Nov 28 14:38:12 2018 +0100
Branches: blender2.8
https://developer.blender.org/rB3cc0eb36c3c05ac2661e2fac04c51db1bf0082b9

Fix T58068: gizmo crash for bone on a disabled armature layer

Maniphest Tasks: T58068

Differential Revision: https://developer.blender.org/D4004

===================================================================

M	source/blender/editors/space_view3d/view3d_gizmo_armature.c

===================================================================

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)))



More information about the Bf-blender-cvs mailing list