Pcbnew: fix crash when loading a library with a ft containing a dimension.
(crash due to the use of a null pointer during loading)
This commit is contained in:
parent
e7c3350482
commit
5735a57504
|
@ -209,7 +209,7 @@ void PCB_DIMENSION_BASE::SetUnitsMode( DIM_UNITS_MODE aMode )
|
|||
|
||||
case DIM_UNITS_MODE::AUTOMATIC:
|
||||
m_autoUnits = true;
|
||||
m_units = GetBoard()->GetUserUnits();
|
||||
m_units = GetBoard() ? GetBoard()->GetUserUnits() : EDA_UNITS::MILLIMETRES;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue