fix hang in fracturing algorithm

This commit is contained in:
Tomasz Wlostowski 2015-07-30 13:49:22 +02:00 committed by Maciej Suminski
parent 07ad6cb0bb
commit fb29373b4c
1 changed files with 2 additions and 2 deletions

View File

@ -350,7 +350,7 @@ static int processEdge( FractureEdgeSet& edges, FractureEdge* edge )
int dist = ( x - x_intersect );
if( dist > 0 && dist < min_dist )
if( dist >= 0 && dist < min_dist && (*i)->m_connected )
{
min_dist = dist;
x_nearest = x_intersect;