Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2015-12-28 18:48:35 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-12-28 18:48:35 +0300
commit6c99d342d8ab68a60ceddb3ecdca48516fc8ba4d (patch)
tree4ff4c429aa0d48d9a9df3c4fe6a97500921c96db /source
parent6f1c44e61180a5551a874ad382ff52ad664ada1c (diff)
Minor cleanup (paranoid checks) and fixes from coverity.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/space_view3d/drawarmature.c10
-rw-r--r--source/blender/editors/space_view3d/drawobject.c2
2 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c
index 2ff3dcdda29..e35c70048e7 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 b59a6d88bfa..41b22f49613 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 {