uninitialized variable used in mesh_foreachScreenVert__mapFunc
authorCampbell Barton <ideasman42@gmail.com>
Wed, 18 Feb 2009 04:43:12 +0000 (04:43 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 18 Feb 2009 04:43:12 +0000 (04:43 +0000)
source/blender/src/drawobject.c

index 551ce874db8abb4e2e0ab6cd5a182bcf2fc91e63..ad9120e42e7ea07c2523fc6fca28a0661c83b8fa 100644 (file)
@@ -1196,15 +1196,18 @@ static void mesh_foreachScreenVert__mapFunc(void *userData, int index, float *co
 {
        struct { void (*func)(void *userData, EditVert *eve, int x, int y, int index); void *userData; int clipVerts; float pmat[4][4], vmat[4][4]; } *data = userData;
        EditVert *eve = EM_get_vert_for_index(index);
-       short s[2];
 
        if (eve->h==0) {
+               short s[2]= {IS_CLIPPED, 0};
                if (data->clipVerts) {
                        view3d_project_short_clip(curarea, co, s, data->pmat, data->vmat);
                } else {
                        view3d_project_short_noclip(curarea, co, s, data->pmat);
                }
-
+               
+               if (s[0]==IS_CLIPPED)
+                       return;
+               
                data->func(data->userData, eve, s[0], s[1], index);
        }
 }