Don't crash when trying to draw a no connect with no parent schematic
This commit is contained in:
parent
adff7f749b
commit
da17437490
|
@ -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 );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue