fix dereference of a deleted pointer

This commit is contained in:
Tomasz Wlostowski 2015-06-19 19:39:33 +02:00 committed by Maciej Suminski
parent 09febe745d
commit e8fca89a2c
1 changed files with 7 additions and 4 deletions

View File

@ -447,16 +447,19 @@ void SHAPE_POLY_SET::fractureSingle( ClipperLib::Paths& paths )
paths.clear();
Path newPath;
newPath.push_back(prev);
FractureEdge *e;
FractureEdge *e, *e_next;
IntPoint p;
for( e = root; e->m_next != root; e=e->m_next)
{
e = root;
do {
p = e->m_p1;
newPath.push_back(p);
prev = p;
e_next = e->m_next;
delete e;
}
e = e_next;
} while(e->m_next != root);
p = e->m_p1;