Fix #19426: loop select with occlude background geometry did not
[blender-staging.git] / source / blender / editors / mesh / editmesh_mods.c
index 09ea9088a166d85b57762306d871caff7db008b3..3135863d57130b343787fb6fcacc32e8677bdb26 100644 (file)
@@ -2033,6 +2033,9 @@ static void mouse_mesh_loop(bContext *C, short mval[2], short extend, short ring
        vc.mval[0]= mval[0];
        vc.mval[1]= mval[1];
        em= vc.em;
+
+       /* no afterqueue (yet), so we check it now, otherwise the em_xxxofs indices are bad */
+       view3d_validate_backbuf(&vc);
        
        eed= findnearestedge(&vc, &dist);
        if(eed) {
@@ -2110,6 +2113,9 @@ static void mouse_mesh_shortest_path(bContext *C, short mval[2])
        vc.mval[1]= mval[1];
        em= vc.em;
        
+       /* no afterqueue (yet), so we check it now, otherwise the em_xxxofs indices are bad */
+       view3d_validate_backbuf(&vc);
+       
        eed= findnearestedge(&vc, &dist);
        if(eed) {
                Mesh *me= vc.obedit->data;