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:
jean-pierre charras 2023-03-07 10:09:34 +01:00
parent e7c3350482
commit 5735a57504
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}
}