diff -uNr Boost-Geometry-Utils-0.15/src/mline2av.h Boost-Geometry-Utils-0.15p/src/mline2av.h --- Boost-Geometry-Utils-0.15/src/mline2av.h 2013-06-21 20:47:35.000000000 +0300 +++ Boost-Geometry-Utils-0.15p/src/mline2av.h 2014-08-17 15:57:02.117758229 +0300 @@ -9,7 +9,8 @@ { AV* av = newAV(); const unsigned int size = mls.size(); - av_extend(av, size-1); + if (size > 0) + av_extend(av, size-1); for (int i = 0; i < size; i++) { AV* lineav = newAV();