Bugfix (IRC report)
authorTon Roosendaal <ton@blender.org>
Mon, 15 Nov 2010 11:45:54 +0000 (11:45 +0000)
committerTon Roosendaal <ton@blender.org>
Mon, 15 Nov 2010 11:45:54 +0000 (11:45 +0000)
Bone drawing code failed to check the correnct parent pointer, causing
NULL pointer to be read. Thanks Wahooney!

source/blender/editors/space_view3d/drawarmature.c

index 8cfb11478be9984907bbff9e504430d0a8d79486..e65751e1f9d7fe5922a4d6cb3d2f6a3ed46aec6c 100644 (file)
@@ -1772,7 +1772,7 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base,
                        
                        if ((bone) && !(bone->flag & (BONE_HIDDEN_P|BONE_HIDDEN_PG))) {
                                if (bone->layer & arm->layer) {
-                                       if ((do_dashed & 1) && (bone->parent)) {
+                                       if ((do_dashed & 1) && (pchan->parent)) {
                                                /* Draw a line from our root to the parent's tip 
                                                 *      - only if V3D_HIDE_HELPLINES is enabled...
                                                 */