PartDesign: fix crash when opening a file with a metric hole

This commit is contained in:
jffmichi
2025-02-11 01:11:56 +01:00
committed by Chris Hennes
parent c962dbbeb6
commit 72c37f9b75

View File

@@ -1176,13 +1176,14 @@ std::optional<double> Hole::determineDiameter() const
return std::nullopt;
throw Base::IndexError("Thread size out of range");
}
double diameter = threadDescription[threadType][threadSize].diameter;
double pitch = threadDescription[threadType][threadSize].pitch;
double clearance = 0.0;
if (threadType == 0)
return std::nullopt;
double diameter = threadDescription[threadType][threadSize].diameter;
double pitch = threadDescription[threadType][threadSize].pitch;
double clearance = 0.0;
if (Threaded.getValue()) {
if (ModelThread.getValue()) {