PNS: Check that we are optimizing a pad
Vias are also sent to breakout optimizer, so we need to check for the solid cast before dereference. Fixes: lp:1841057 * https://bugs.launchpad.net/kicad/+bug/1841057
This commit is contained in:
parent
de74590279
commit
03d5bf0df5
|
@ -851,7 +851,7 @@ int OPTIMIZER::smartPadsSingle( LINE* aLine, ITEM* aPad, bool aEnd, int aEndVert
|
|||
for( int p = 1; p <= p_end; p++ )
|
||||
{
|
||||
// If the line is contained inside the pad, don't optimize
|
||||
if( solid->Shape() && !solid->Shape()->Collide(
|
||||
if( solid && solid->Shape() && !solid->Shape()->Collide(
|
||||
SEG( line.CPoint( 0 ), line.CPoint( p ) ), aLine->Width() / 2 ) )
|
||||
continue;
|
||||
|
||||
|
|
Loading…
Reference in New Issue