diff --git a/src/Mod/TechDraw/App/DrawViewPart.cpp b/src/Mod/TechDraw/App/DrawViewPart.cpp index b0be5e032090..c75fe1b6c360 100644 --- a/src/Mod/TechDraw/App/DrawViewPart.cpp +++ b/src/Mod/TechDraw/App/DrawViewPart.cpp @@ -367,10 +367,14 @@ void DrawViewPart::extractFaces() } std::vector sortedWires = sortWiresBySize(fw,false); + if (!sortedWires.size()) { + Base::Console().Log("INFO - DVP::extractFaces - no sorted Wires!\n"); + return; // might happen in the middle of changes? + } //remove the largest wire (OuterWire of graph) Bnd_Box bigBox; - if (!(sortedWires.back().IsNull())) { + if (sortedWires.size() && !sortedWires.front().IsNull()) { BRepBndLib::Add(sortedWires.front(), bigBox); bigBox.SetGap(0.0); }