From 98a0e3058209fa1888eed8bb461fd5c5d51d2d64 Mon Sep 17 00:00:00 2001 From: Alexander Golubev Date: Tue, 21 Jul 2015 08:15:12 +0300 Subject: [PATCH] PartDesign: fix a crash in the loft --- src/Mod/PartDesign/App/FeatureLoft.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Mod/PartDesign/App/FeatureLoft.cpp b/src/Mod/PartDesign/App/FeatureLoft.cpp index a079e4ca7..d4506e418 100644 --- a/src/Mod/PartDesign/App/FeatureLoft.cpp +++ b/src/Mod/PartDesign/App/FeatureLoft.cpp @@ -117,12 +117,10 @@ App::DocumentObjectExecReturn *Loft::execute(void) TopExp_Explorer ex; int i=0; - for (ex.Init(static_cast(obj)->Shape.getValue(), TopAbs_WIRE); ex.More(); ex.Next()) { - wiresections[i].push_back(TopoDS::Wire(ex.Current())); + for (ex.Init(static_cast(obj)->Shape.getValue(), TopAbs_WIRE); ex.More(); ex.Next(), ++i) { if(i>=wiresections.size()) return new App::DocumentObjectExecReturn("Loft: Sections need to have the same amount of inner wires as the base section"); - - ++i; + wiresections[i].push_back(TopoDS::Wire(ex.Current())); } if(i