0025568: SIGSEGV in thrusections with edge without 3D curve
[occt.git] / src / BRepTest / BRepTest_SweepCommands.cxx
index 415384e..ef1329c 100644 (file)
@@ -408,10 +408,13 @@ Standard_Integer thrusections(Draw_Interpretor&, Standard_Integer n, const char*
 
   Generator.Build();
 
-  TopoDS_Shape Shell = Generator.Shape();
-  
-  DBRep::Set(a[index-1], Shell);
-
+  if (Generator.IsDone()) {
+    TopoDS_Shape Shell = Generator.Shape();
+    DBRep::Set(a[index-1], Shell);
+  }
+  else {
+    cout << "Algorithm is not done" << endl;
+  }
   return 0;
 }