Don't crash when trying to draw a no connect with no parent schematic

This commit is contained in:
Jon Evans 2020-08-25 13:26:20 -04:00
parent adff7f749b
commit da17437490
1 changed files with 3 additions and 0 deletions

View File

@ -97,6 +97,9 @@ void SCH_NO_CONNECT::GetEndPoints( std::vector< DANGLING_END_ITEM >& aItemList )
int SCH_NO_CONNECT::GetPenWidth() const
{
if( !Schematic() )
return 1;
return std::max( Schematic()->Settings().m_DefaultLineWidth, 1 );
}