From ee1dc842397efc37d09778dae2c61ba23831b205 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 21 Mar 2012 17:34:31 +0000 Subject: [PATCH] Fix for crash on selecting loop in cases when some edges aren't connected to any faces. --- source/blender/bmesh/intern/bmesh_walkers_impl.c | 12 +++++++++--- 1 file 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;