Bugfix: crash in posemode transform buttons with no active pose bone.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Fri, 6 Nov 2009 21:41:07 +0000 (21:41 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Fri, 6 Nov 2009 21:41:07 +0000 (21:41 +0000)
source/blender/editors/space_view3d/view3d_buttons.c

index 8c0eff4..12adfce 100644 (file)
@@ -592,6 +592,11 @@ static void v3d_posearmature_buts(uiLayout *layout, View3D *v3d, Object *ob, flo
        }
 //     row= uiLayoutRow(layout, 0);
        
+       if (!pchan)     {
+               uiItemL(layout, "No Bone Active", 0);
+               return; 
+       }
+
        RNA_pointer_create(&ob->id, &RNA_PoseChannel, pchan, &pchanptr);
 
        col= uiLayoutColumn(layout, 0);