diff -ur dvisvgm-1.0.2.orig/src/GraphicPath.h dvisvgm-1.0.2/src/GraphicPath.h --- dvisvgm-1.0.2.orig/src/GraphicPath.h 2010-06-16 19:09:47.000000000 +0200 +++ dvisvgm-1.0.2/src/GraphicPath.h 2010-07-05 10:38:09.963061244 +0200 @@ -247,7 +247,7 @@ * @param[in] optimize if true, shorthand drawing commands (sconicto, scubicto,...) are considered */ template void GraphicPath::iterate (Actions &actions, bool optimize) const { - ConstIterator prev; // pointer to preceding command + ConstIterator prev = _commands.end(); // pointer to preceding command Point fp; // first point of current path Point cp; // current point Point pstore[2]; @@ -280,7 +280,7 @@ } break; case Command::CONICTO: - if (optimize && prev->type == Command::CONICTO && params[0] == pstore[1]*T(2)-pstore[0]) { + if (optimize && prev != _commands.end() && prev->type == Command::CONICTO && params[0] == pstore[1]*T(2)-pstore[0]) { actions.sconicto(params[1]); actions.draw('T', params+1, 1); } @@ -293,7 +293,7 @@ break; case Command::CUBICTO: // is first control point reflection of preceding second control point? - if (optimize && prev->type == Command::CUBICTO && params[0] == pstore[1]*T(2)-pstore[0]) { + if (optimize && prev != _commands.end() && prev->type == Command::CUBICTO && params[0] == pstore[1]*T(2)-pstore[0]) { actions.scubicto(params[1], params[2]); actions.draw('S', params+1, 2); } diff -ur dvisvgm-1.0.2.orig/src/PsSpecialHandler.h dvisvgm-1.0.2/src/PsSpecialHandler.h --- dvisvgm-1.0.2.orig/src/PsSpecialHandler.h 2010-06-17 19:07:35.000000000 +0200 +++ dvisvgm-1.0.2/src/PsSpecialHandler.h 2010-07-05 10:38:09.963061244 +0200 @@ -31,9 +31,10 @@ class PsSpecialHandler : public SpecialHandler, protected PSActions { + typedef GraphicPath Path; + class ClippingStack { - typedef GraphicPath Path; public: void push (); void push (const Path &path); @@ -100,7 +101,7 @@ SpecialActions *_actions; bool _initialized; XMLElementNode *_xmlnode; ///< if != 0, created SVG elements are appended to this node - GraphicPath _path; + Path _path; DPair _currentpoint; ///< current PS position double _linewidth; ///< current linewidth double _miterlimit; ///< current miter limit