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,7 +844,9 @@ bool ConvertOutlineToPolygon( std::vector<PCB_SHAPE*>& aSegList, SHAPE_POLY_SET&
|
||||||
{
|
{
|
||||||
BOARD_ITEM* a = fetchOwner( *seg1 );
|
BOARD_ITEM* a = fetchOwner( *seg1 );
|
||||||
BOARD_ITEM* b = fetchOwner( *seg2 );
|
BOARD_ITEM* b = fetchOwner( *seg2 );
|
||||||
(*aErrorHandler)( _( "(self-intersecting)" ), a, b, (wxPoint) ( *seg1 ).A );
|
|
||||||
|
if( a && b )
|
||||||
|
(*aErrorHandler)( _( "(self-intersecting)" ), a, b, (wxPoint) ( *seg1 ).A );
|
||||||
}
|
}
|
||||||
|
|
||||||
selfIntersecting = true;
|
selfIntersecting = true;
|
||||||
|
@ -856,7 +858,9 @@ bool ConvertOutlineToPolygon( std::vector<PCB_SHAPE*>& aSegList, SHAPE_POLY_SET&
|
||||||
{
|
{
|
||||||
BOARD_ITEM* a = fetchOwner( *seg1 );
|
BOARD_ITEM* a = fetchOwner( *seg1 );
|
||||||
BOARD_ITEM* b = fetchOwner( *seg2 );
|
BOARD_ITEM* b = fetchOwner( *seg2 );
|
||||||
(*aErrorHandler)( _( "(self-intersecting)" ), a, b, (wxPoint) pt.get() );
|
|
||||||
|
if( a && b )
|
||||||
|
(*aErrorHandler)( _( "(self-intersecting)" ), a, b, (wxPoint) pt.get() );
|
||||||
}
|
}
|
||||||
|
|
||||||
selfIntersecting = true;
|
selfIntersecting = true;
|
||||||
|
|
Loading…
Reference in New Issue