Fix for crash on selecting loop in cases when some edges aren't connected to any faces.

This commit is contained in:
Sergey Sharybin
2012-03-21 17:34:31 +00:00
parent af46a2902f
commit ee1dc84239

View File

@@ -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;