Fix T51100: Vertex pick fails after extrude
authorCampbell Barton <ideasman42@gmail.com>
Thu, 13 Jul 2017 04:13:59 +0000 (14:13 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 13 Jul 2017 04:13:59 +0000 (14:13 +1000)
source/blender/editors/mesh/editmesh_select.c

index a6de1b284b7913bffa04ff38bd3db5e0c284cd57..68bd8ff27b1d1da8d4b9e5a2a8f8d23882dac75d 100644 (file)
@@ -446,6 +446,9 @@ BMVert *EDBM_vert_find_nearest_ex(
                unsigned int index;
                BMVert *eve;
                
+               /* No afterqueue (yet), so we check it now, otherwise the bm_xxxofs indices are bad. */
+               ED_view3d_backbuf_validate(vc);
+
                index = ED_view3d_backbuf_sample_rect(
                        vc, vc->mval, dist_px, bm_wireoffs, 0xFFFFFF, &dist_test);
                eve = index ? BM_vert_at_index_find_or_table(bm, index - 1) : NULL;
@@ -630,7 +633,8 @@ BMEdge *EDBM_edge_find_nearest_ex(
                float dist_test = 0.0f;
                unsigned int index;
                BMEdge *eed;
-               
+
+               /* No afterqueue (yet), so we check it now, otherwise the bm_xxxofs indices are bad. */
                ED_view3d_backbuf_validate(vc);
 
                index = ED_view3d_backbuf_sample_rect(vc, vc->mval, dist_px, bm_solidoffs, bm_wireoffs, &dist_test);