]> OCCT Git - occt.git/commitdiff
Modeling - Segfault on chamfer or fillet approaching ellipse (#738)
authorDmitrii Kulikov <164657232+AtheneNoctuaPt@users.noreply.github.com>
Tue, 7 Oct 2025 19:15:37 +0000 (20:15 +0100)
committerGitHub <noreply@github.com>
Tue, 7 Oct 2025 19:15:37 +0000 (20:15 +0100)
Fixed nullptr dereference

src/ModelingAlgorithms/TKFillet/ChFi3d/ChFi3d_Builder_C1.cxx

index 73d2af021082871324f802eb2adc5e8501b5be3f..90d1a1ab99a7c13723011e0b85842f318b6961cc 100644 (file)
@@ -2637,6 +2637,10 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index)
             cfacemoins1->D0(paredge2, pfac2);
             cface->D0(paredge2, pint);
           }
+          else if (C2dint1.IsNull() || C2dint2.IsNull())
+          {
+            throw Standard_ConstructionError("Failed to get p-curve of edge");
+          }
           else
           {
             C2dint1->D0(paredge2, pfac2);