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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-10-02 08:31:51 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-10-02 08:31:51 +0400
commit16c4795e96f6dd7674dbcc3b44bd7b629237a81c (patch)
tree97b753561ae6efe759c0d42dec2b541d3ccc8ebd
parentdc8340fa331164b78ba3414a67ec625bc80d30b6 (diff)
fix for mesh_foreachScreenEdge__mapFunc running the callback with V3D_CLIP_TEST_RV3D_CLIPPING'd verts. (used uninitialised stack memory)
-rw-r--r--source/blender/editors/space_view3d/drawobject.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index c49e7eebb48..7badca304c4 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -2162,6 +2162,10 @@ static void mesh_foreachScreenEdge__mapFunc(void *userData, int index, const flo
if (data->clipVerts == V3D_CLIP_TEST_RV3D_CLIPPING) {
view3d_project_short_clip(data->vc.ar, v0co, s[0], TRUE);
view3d_project_short_clip(data->vc.ar, v1co, s[1], TRUE);
+
+ if (s[0][0] == IS_CLIPPED || s[1][0] == IS_CLIPPED) {
+ return;
+ }
}
else {
float v1_co[3], v2_co[3];
@@ -2169,6 +2173,8 @@ static void mesh_foreachScreenEdge__mapFunc(void *userData, int index, const flo
mul_v3_m4v3(v1_co, data->vc.obedit->obmat, v0co);
mul_v3_m4v3(v2_co, data->vc.obedit->obmat, v1co);
+ /* XXX, todo, use ED_view3d_project_int_noclip(...), however these functions work differently
+ * and need to be cleaned up, Campbell */
ED_view3d_project_short_noclip(data->vc.ar, v1_co, s[0]);
ED_view3d_project_short_noclip(data->vc.ar, v2_co, s[1]);