[Bf-blender-cvs] [788488b1aa0] blender2.8: Fix: With no bones selected, move bones to layer operator would display garbage layer set

Joshua Leung noreply at git.blender.org
Mon May 14 15:43:06 CEST 2018


Commit: 788488b1aa0f67f49e348a135e8ef2a0241a9706
Author: Joshua Leung
Date:   Mon May 14 14:37:14 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB788488b1aa0f67f49e348a135e8ef2a0241a9706

Fix: With no bones selected, move bones to layer operator would display garbage layer set

Was using uninitialised memory

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

M	source/blender/editors/armature/pose_edit.c

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

diff --git a/source/blender/editors/armature/pose_edit.c b/source/blender/editors/armature/pose_edit.c
index d24848b4b76..09190af0360 100644
--- a/source/blender/editors/armature/pose_edit.c
+++ b/source/blender/editors/armature/pose_edit.c
@@ -917,7 +917,7 @@ void ARMATURE_OT_armature_layers(wmOperatorType *ot)
 /* Present a popup to get the layers that should be used */
 static int pose_bone_layers_invoke(bContext *C, wmOperator *op, const wmEvent *event)
 {
-	int layers[32]; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */
+	int layers[32] = {0}; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */
 	
 	/* get layers that are active already */
 	CTX_DATA_BEGIN (C, bPoseChannel *, pchan, selected_pose_bones)



More information about the Bf-blender-cvs mailing list