mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 10:13:19 +02:00
Fix a crash when opening PCB.
This commit is contained in:
parent
9fb61faeb2
commit
c5a6409c35
@ -2531,6 +2531,8 @@ void FOOTPRINT::BuildCourtyardCaches( OUTLINE_ERROR_HANDLER* aErrorHandler )
|
|||||||
if( ConvertOutlineToPolygon( list_front, m_courtyard_cache_front, maxError, chainingEpsilon,
|
if( ConvertOutlineToPolygon( list_front, m_courtyard_cache_front, maxError, chainingEpsilon,
|
||||||
true, aErrorHandler ) )
|
true, aErrorHandler ) )
|
||||||
{
|
{
|
||||||
|
int width = 0;
|
||||||
|
|
||||||
// Touching courtyards, or courtyards -at- the clearance distance are legal.
|
// Touching courtyards, or courtyards -at- the clearance distance are legal.
|
||||||
m_courtyard_cache_front.Inflate( -1, CORNER_STRATEGY::CHAMFER_ACUTE_CORNERS, maxError );
|
m_courtyard_cache_front.Inflate( -1, CORNER_STRATEGY::CHAMFER_ACUTE_CORNERS, maxError );
|
||||||
|
|
||||||
@ -2540,7 +2542,9 @@ void FOOTPRINT::BuildCourtyardCaches( OUTLINE_ERROR_HANDLER* aErrorHandler )
|
|||||||
{
|
{
|
||||||
return a.second < b.second;
|
return a.second < b.second;
|
||||||
} );
|
} );
|
||||||
int width = max->first;
|
|
||||||
|
if( max != front_width_histogram.end() )
|
||||||
|
width = max->first;
|
||||||
|
|
||||||
if( width == 0 )
|
if( width == 0 )
|
||||||
width = DEFAULT_COURTYARD_WIDTH;
|
width = DEFAULT_COURTYARD_WIDTH;
|
||||||
@ -2553,9 +2557,11 @@ void FOOTPRINT::BuildCourtyardCaches( OUTLINE_ERROR_HANDLER* aErrorHandler )
|
|||||||
SetFlags( MALFORMED_F_COURTYARD );
|
SetFlags( MALFORMED_F_COURTYARD );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ConvertOutlineToPolygon( list_back, m_courtyard_cache_back, maxError, chainingEpsilon,
|
if( ConvertOutlineToPolygon( list_back, m_courtyard_cache_back, maxError, chainingEpsilon, true,
|
||||||
true, aErrorHandler ) )
|
aErrorHandler ) )
|
||||||
{
|
{
|
||||||
|
int width = 0;
|
||||||
|
|
||||||
// Touching courtyards, or courtyards -at- the clearance distance are legal.
|
// Touching courtyards, or courtyards -at- the clearance distance are legal.
|
||||||
m_courtyard_cache_back.Inflate( -1, CORNER_STRATEGY::CHAMFER_ACUTE_CORNERS, maxError );
|
m_courtyard_cache_back.Inflate( -1, CORNER_STRATEGY::CHAMFER_ACUTE_CORNERS, maxError );
|
||||||
|
|
||||||
@ -2565,7 +2571,9 @@ void FOOTPRINT::BuildCourtyardCaches( OUTLINE_ERROR_HANDLER* aErrorHandler )
|
|||||||
{
|
{
|
||||||
return a.second < b.second;
|
return a.second < b.second;
|
||||||
} );
|
} );
|
||||||
int width = max->first;
|
|
||||||
|
if( max != back_width_histogram.end() )
|
||||||
|
width = max->first;
|
||||||
|
|
||||||
if( width == 0 )
|
if( width == 0 )
|
||||||
width = DEFAULT_COURTYARD_WIDTH;
|
width = DEFAULT_COURTYARD_WIDTH;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user