From d6ba53823278a7e5534addd34e8a32192cca6474 Mon Sep 17 00:00:00 2001 From: johanengelen Date: Fri, 30 May 2008 21:13:33 +0000 Subject: [PATCH] fix crash in 2geom (already committed to 2geom) --- src/2geom/path.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/2geom/path.cpp b/src/2geom/path.cpp index 564b8c58a..35c7b76bc 100644 --- a/src/2geom/path.cpp +++ b/src/2geom/path.cpp @@ -58,8 +58,11 @@ Rect Path::boundsFast() const { Rect Path::boundsExact() const { Rect bounds=front().boundsExact(); - for ( const_iterator iter=++begin(); iter != end() ; ++iter ) { - bounds.unionWith(iter->boundsExact()); + const_iterator iter = begin(); + if ( iter != end() ) { + for ( ++iter; iter != end() ; ++iter ) { + bounds.unionWith(iter->boundsExact()); + } } return bounds; } -- 2.30.2