From 808dc042e31e12f3ac6d955fdf7454b26e6f212c Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Fri, 30 May 2008 21:13:33 +0000 Subject: fix crash in 2geom (already committed to 2geom) (bzr r5768) --- src/2geom/path.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/2geom/path.cpp') 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; } -- cgit v1.2.3