ConvertOutlineToPolygon: Don't crash if we didn't find a segment owner
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8184
This commit is contained in:
parent
715c61ac9f
commit
94fad2944d
|
@ -844,6 +844,8 @@ bool ConvertOutlineToPolygon( std::vector<PCB_SHAPE*>& aSegList, SHAPE_POLY_SET&
|
|||
{
|
||||
BOARD_ITEM* a = fetchOwner( *seg1 );
|
||||
BOARD_ITEM* b = fetchOwner( *seg2 );
|
||||
|
||||
if( a && b )
|
||||
(*aErrorHandler)( _( "(self-intersecting)" ), a, b, (wxPoint) ( *seg1 ).A );
|
||||
}
|
||||
|
||||
|
@ -856,6 +858,8 @@ bool ConvertOutlineToPolygon( std::vector<PCB_SHAPE*>& aSegList, SHAPE_POLY_SET&
|
|||
{
|
||||
BOARD_ITEM* a = fetchOwner( *seg1 );
|
||||
BOARD_ITEM* b = fetchOwner( *seg2 );
|
||||
|
||||
if( a && b )
|
||||
(*aErrorHandler)( _( "(self-intersecting)" ), a, b, (wxPoint) pt.get() );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue