summaryrefslogtreecommitdiffstats
path: root/src/2geom/path.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2008-05-30 21:13:33 +0000
committerjohanengelen <johanengelen@users.sourceforge.net>2008-05-30 21:13:33 +0000
commit808dc042e31e12f3ac6d955fdf7454b26e6f212c (patch)
tree14dbc88f771f920d72a2f0bb5cf55ddd03a61fce /src/2geom/path.cpp
parentadd missing files (diff)
downloadinkscape-808dc042e31e12f3ac6d955fdf7454b26e6f212c.tar.gz
inkscape-808dc042e31e12f3ac6d955fdf7454b26e6f212c.zip
fix crash in 2geom (already committed to 2geom)
(bzr r5768)
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;
}