Skip to content

Commit 72c37f9

Browse files
jffmichichennes
authored andcommitted
PartDesign: fix crash when opening a file with a metric hole
1 parent c962dbb commit 72c37f9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Mod/PartDesign/App/FeatureHole.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1176,13 +1176,14 @@ std::optional<double> Hole::determineDiameter() const
11761176
return std::nullopt;
11771177
throw Base::IndexError("Thread size out of range");
11781178
}
1179-
double diameter = threadDescription[threadType][threadSize].diameter;
1180-
double pitch = threadDescription[threadType][threadSize].pitch;
1181-
double clearance = 0.0;
11821179

11831180
if (threadType == 0)
11841181
return std::nullopt;
11851182

1183+
double diameter = threadDescription[threadType][threadSize].diameter;
1184+
double pitch = threadDescription[threadType][threadSize].pitch;
1185+
double clearance = 0.0;
1186+
11861187
if (Threaded.getValue()) {
11871188

11881189
if (ModelThread.getValue()) {

0 commit comments

Comments
 (0)