From 66fa2a242e8707f68b6a2996c9c4c7f99c14de09 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 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); }