Fix crash on Preferences > Colors.

This commit is contained in:
Jeff Young 2020-07-31 11:59:52 +01:00
parent 4c5fe7e651
commit 047e95ccc4
1 changed files with 7 additions and 1 deletions

View File

@ -189,7 +189,13 @@ int SCH_JUNCTION::GetDiameter() const
int diameter = m_diameter;
if( diameter == 0 )
diameter = Schematic()->Settings().m_JunctionSize;
{
// Careful; preview items don't have schematics...
if( Schematic() )
diameter = Schematic()->Settings().m_JunctionSize;
else
diameter = DEFAULT_JUNCTION_DIAM * IU_PER_MILS;
}
NETCLASSPTR netclass = NetClass();