SHAPE_POLY_SET: fix segfault in unfracturing of polygons with 0-width slits
Fixes: lp:1740253 * https://bugs.launchpad.net/kicad/+bug/1740253
This commit is contained in:
parent
9fd53c4753
commit
aab4c59615
|
@ -896,7 +896,7 @@ void SHAPE_POLY_SET::unfractureSingle( SHAPE_POLY_SET::POLYGON& aPoly )
|
|||
|
||||
bool compareSegs( const SEG& s1, const SEG& s2 ) const
|
||||
{
|
||||
return (s1.A == s2.A && s1.B == s2.B) || (s1.A == s2.B && s1.B == s2.A);
|
||||
return (s1.A == s2.B && s1.B == s2.A);
|
||||
}
|
||||
|
||||
bool operator==( const EDGE& aOther ) const
|
||||
|
@ -1011,7 +1011,7 @@ void SHAPE_POLY_SET::unfractureSingle( SHAPE_POLY_SET::POLYGON& aPoly )
|
|||
do {
|
||||
edgeBuf[cnt++] = e;
|
||||
e = e->next;
|
||||
} while( e != e_first );
|
||||
} while( e && e != e_first );
|
||||
|
||||
SHAPE_LINE_CHAIN outl;
|
||||
|
||||
|
|
Loading…
Reference in New Issue