diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-03-21 21:34:31 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-03-21 21:34:31 +0400 |
commit | ee1dc842397efc37d09778dae2c61ba23831b205 (patch) | |
tree | 516acf08241e8771bd683c9f806d97fcb0e5cb7a | |
parent | af46a2902fff686a4abf59f0126c59b2e48bd4c4 (diff) |
Fix for crash on selecting loop in cases when some edges aren't connected to any faces.
-rw-r--r-- | source/blender/bmesh/intern/bmesh_walkers_impl.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/bmesh/intern/bmesh_walkers_impl.c b/source/blender/bmesh/intern/bmesh_walkers_impl.c index fdc5f5f38c0..8efcf9498f4 100644 --- a/source/blender/bmesh/intern/bmesh_walkers_impl.c +++ b/source/blender/bmesh/intern/bmesh_walkers_impl.c @@ -412,9 +412,15 @@ static void bmw_LoopWalker_begin(BMWalker *walker, void *data) } } - /* only use hub selection for 5+ sides else this could - * conflict with normal edge loop selection. */ - lwalk->f_hub = f_best->len > 4 ? f_best : NULL; + if (f_best) { + /* only use hub selection for 5+ sides else this could + * conflict with normal edge loop selection. */ + lwalk->f_hub = f_best->len > 4 ? f_best : NULL; + } + else { + /* edge doesn't have any faces connected to it */ + lwalk->f_hub = NULL; + } } else { lwalk->f_hub = NULL; |