pcbnew: Fix crash with differential routing
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14537
(cherry picked from commit 469fe76994
)
This commit is contained in:
parent
204549f55b
commit
0736c141b9
|
@ -140,7 +140,7 @@ const SHAPE_LINE_CHAIN VIA::Hull( int aClearance, int aWalkaroundThickness, int
|
||||||
int cl = ( aClearance + aWalkaroundThickness / 2 );
|
int cl = ( aClearance + aWalkaroundThickness / 2 );
|
||||||
int width = m_diameter;
|
int width = m_diameter;
|
||||||
|
|
||||||
if( !ROUTER::GetInstance()->GetInterface()->IsFlashedOnLayer( this, aLayer ) )
|
if( m_hole && !ROUTER::GetInstance()->GetInterface()->IsFlashedOnLayer( this, aLayer ) )
|
||||||
width = m_hole->Radius() * 2;
|
width = m_hole->Radius() * 2;
|
||||||
|
|
||||||
// Chamfer = width * ( 1 - sqrt(2)/2 ) for equilateral octagon
|
// Chamfer = width * ( 1 - sqrt(2)/2 ) for equilateral octagon
|
||||||
|
@ -160,6 +160,7 @@ VIA* VIA::Clone() const
|
||||||
v->m_diameter = m_diameter;
|
v->m_diameter = m_diameter;
|
||||||
v->m_drill = m_drill;
|
v->m_drill = m_drill;
|
||||||
v->m_shape = SHAPE_CIRCLE( m_pos, m_diameter / 2 );
|
v->m_shape = SHAPE_CIRCLE( m_pos, m_diameter / 2 );
|
||||||
|
delete v->m_hole;
|
||||||
v->m_hole = m_hole->Clone();
|
v->m_hole = m_hole->Clone();
|
||||||
v->m_rank = m_rank;
|
v->m_rank = m_rank;
|
||||||
v->m_marker = m_marker;
|
v->m_marker = m_marker;
|
||||||
|
|
|
@ -53,12 +53,12 @@ public:
|
||||||
VIA() :
|
VIA() :
|
||||||
LINKED_ITEM( VIA_T )
|
LINKED_ITEM( VIA_T )
|
||||||
{
|
{
|
||||||
m_diameter = 2; // Dummy value
|
m_diameter = 2; // Dummy value
|
||||||
m_drill = 0;
|
m_drill = 0;
|
||||||
m_viaType = VIATYPE::THROUGH;
|
m_viaType = VIATYPE::THROUGH;
|
||||||
m_isFree = false;
|
m_isFree = false;
|
||||||
m_isVirtual = false;
|
m_isVirtual = false;
|
||||||
m_hole = nullptr;
|
m_hole = HOLE::MakeCircularHole( m_pos, m_diameter / 2 );
|
||||||
}
|
}
|
||||||
|
|
||||||
VIA( const VECTOR2I& aPos, const LAYER_RANGE& aLayers, int aDiameter, int aDrill,
|
VIA( const VECTOR2I& aPos, const LAYER_RANGE& aLayers, int aDiameter, int aDrill,
|
||||||
|
|
Loading…
Reference in New Issue