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 1d6e2b8675
commit 1a1aea735a

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()) {