diff --git a/pcbnew/pcb_dimension.cpp b/pcbnew/pcb_dimension.cpp index a26ee36a1c..83a453544e 100644 --- a/pcbnew/pcb_dimension.cpp +++ b/pcbnew/pcb_dimension.cpp @@ -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; } }