diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2012-03-14 17:52:17 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2012-03-14 17:52:17 +0400 |
commit | a829a905dafda5b23e1bd6c5e67e9093b0018aa3 (patch) | |
tree | 90b4bf62d2f6547d8d7a88f87ffa9f6f58ef5bc4 /source | |
parent | 639cf31f8a91ba6014556be97419afc3fb0797ea (diff) |
fix hang when loop selecting an ngon. We need to check if edge currently walked on has already been added
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_walkers_impl.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/source/blender/bmesh/intern/bmesh_walkers_impl.c b/source/blender/bmesh/intern/bmesh_walkers_impl.c index d4942412bae..b327bf1ef8d 100644 --- a/source/blender/bmesh/intern/bmesh_walkers_impl.c +++ b/source/blender/bmesh/intern/bmesh_walkers_impl.c @@ -467,15 +467,17 @@ static void *bmw_LoopWalker_step(BMWalker *walker) l = BM_face_other_vert_loop(owalk.f_hub, lwalk->lastv, v); nexte = BM_edge_exists(v, l->v); - lwalk = BMW_state_add(walker); - lwalk->cur = nexte; - lwalk->lastv = v; + if(!BLI_ghash_haskey(walker->visithash, nexte)){ + lwalk = BMW_state_add(walker); + lwalk->cur = nexte; + lwalk->lastv = v; - lwalk->is_boundry = owalk.is_boundry; - lwalk->is_single = owalk.is_single; - lwalk->f_hub = owalk.f_hub; + lwalk->is_boundry = owalk.is_boundry; + lwalk->is_single = owalk.is_single; + lwalk->f_hub = owalk.f_hub; - BLI_ghash_insert(walker->visithash, nexte, NULL); + BLI_ghash_insert(walker->visithash, nexte, NULL); + } } } else if (l) { /* NORMAL EDGE WITH FACES */ |