diff --git a/pcbnew/exporters/step/step_pcb_model.cpp b/pcbnew/exporters/step/step_pcb_model.cpp index 5da97c6409..a1252744e1 100644 --- a/pcbnew/exporters/step/step_pcb_model.cpp +++ b/pcbnew/exporters/step/step_pcb_model.cpp @@ -769,7 +769,7 @@ bool STEP_PCB_MODEL::MakeShapes( std::vector& aShapes, const SHAPE int nextShape = aChain.NextShape( i ); // If nextShape points to the end, then we have a circle. - if( nextShape != aChain.PointCount() - 1 ) + if( nextShape != -1 ) i = nextShape; } }