# HG changeset patch # User Santeri Piippo # Date 1400348007 -10800 # Node ID 4661d6e8363039421324c110721abb3824377539 # Parent 8bce7acd100cc6b5badbc0ac9fb44ed27038ab0d - don't crash when inverting conditional lines diff -r 8bce7acd100c -r 4661d6e83630 src/ldObject.cc --- a/src/ldObject.cc Sat May 17 15:45:56 2014 +0300 +++ b/src/ldObject.cc Sat May 17 20:33:27 2014 +0300 @@ -667,16 +667,21 @@ // void LDLine::invert() { - // For lines, we swap the vertices. I don't think that a - // cond-line's control points need to be swapped, do they? + // For lines, we swap the vertices. Vertex tmp = vertex (0); setVertex (0, vertex (1)); setVertex (1, tmp); } +// ============================================================================= +// void LDCondLine::invert() { - static_cast (this)->invert(); + // I don't think that a conditional line's control points need to be + // swapped, do they? + Vertex tmp = vertex (0); + setVertex (0, vertex (1)); + setVertex (1, tmp); } void LDVertex::invert() {}