Index: include/mapnik/ctrans.hpp =================================================================== --- include/mapnik/ctrans.hpp (revision 690) +++ include/mapnik/ctrans.hpp (working copy) @@ -73,6 +73,8 @@ t_.forward(x,y); return command; } + + unsigned num_points() { return geom_.num_points(); } void rewind (unsigned pos) { Index: agg/include/agg_path_length.h =================================================================== --- agg/include/agg_path_length.h (revision 690) +++ agg/include/agg_path_length.h (working copy) @@ -31,6 +31,9 @@ double y2 = 0.0; bool first = true; + if( vs.num_points() <= 1 ) + return 0.0; + unsigned cmd; vs.rewind(path_id); while(!is_stop(cmd = vs.vertex(&x2, &y2)))