Fix crash on Preferences > Colors.

This commit is contained in:
Jeff Young
2020-07-31 12:04:01 +01:00
parent 4c5fe7e651
commit 047e95ccc4
+7 -1
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();