From 5b5243eae542a6fbc4a10de0fd7193597060cfb3 Mon Sep 17 00:00:00 2001 From: WandererFan Date: Sun, 3 Jul 2016 20:23:08 -0400 Subject: [PATCH] prevent fail when scale is zero --- src/Mod/TechDraw/App/DrawViewPart.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Mod/TechDraw/App/DrawViewPart.cpp b/src/Mod/TechDraw/App/DrawViewPart.cpp index b0be5e0320..c75fe1b6c3 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); }