summaryrefslogtreecommitdiffstats
path: root/src/2geom/path.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/2geom/path.cpp')
-rw-r--r--src/2geom/path.cpp7
1 files 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;
}