Commit: 6c99d342d8ab68a60ceddb3ecdca48516fc8ba4d
Author: Bastien Montagne
Date: Mon Dec 28 16:48:35 2015 +0100
Branches: master
https://developer.blender.org/rB6c99d342d8ab68a60ceddb3ecdca48516fc8ba4d
Minor cleanup (paranoid checks) and fixes from coverity.
===================================================================
M source/blender/editors/space_view3d/drawarmature.c
M source/blender/editors/space_view3d/drawobject.c
===================================================================
diff --git a/source/blender/editors/space_view3d/drawarmature.c
b/source/blender/editors/space_view3d/drawarmature.c
index 2ff3dcd..e35c700 100644
--- a/source/blender/editors/space_view3d/drawarmature.c
+++ b/source/blender/editors/space_view3d/drawarmature.c
@@ -119,11 +119,12 @@ static void set_pchan_colorset(Object *ob, bPoseChannel
*pchan)
bcolor = &btheme->tarm[(color_index - 1)];
}
else if (color_index == -1) {
- /* use the group's own custom color set */
- bcolor = (grp) ? &grp->cs : NULL;
+ /* use the group's own custom color set (grp is always != NULL
here) */
+ bcolor = &grp->cs;
}
- else
+ else {
bcolor = NULL;
+ }
}
/* This function is for brightening/darkening a given color (like
UI_ThemeColorShade()) */
@@ -1435,7 +1436,8 @@ static void pchan_draw_IK_root_lines(bPoseChannel *pchan,
short only_temp)
if (segcount == data->chainlen ||
segcount > 255) break; /* 255 is weak */
parchan = parchan->parent;
}
- if (parchan) /* XXX revise the breaking
conditions to only stop at the tail? */
+ /* Only draw line in case our chain is more
than one bone long! */
+ if (parchan != pchan) /* XXX revise the
breaking conditions to only stop at the tail? */
glVertex3fv(parchan->pose_head);
glEnd();
diff --git a/source/blender/editors/space_view3d/drawobject.c
b/source/blender/editors/space_view3d/drawobject.c
index b59a6d8..41b22f4 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -4297,7 +4297,7 @@ static bool draw_mesh_object(Scene *scene, ARegion *ar,
View3D *v3d, RegionView3
GPU_end_object_materials();
- if (obedit != ob && finalDM)
+ if (obedit != ob)
finalDM->release(finalDM);
}
else {
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs