diff --git a/src/data/path.cpp b/src/data/path.cpp index d4bcfb82..d4392cde 100644 --- a/src/data/path.cpp +++ b/src/data/path.cpp @@ -2,11 +2,12 @@ RectC Path::boundingRect() const { - if (size() < 2) - return RectC(); + RectC ret; - RectC ret(first().coordinates(), first().coordinates()); - for (int i = 1; i < size(); i++) + if (size() < 2) + return ret; + + for (int i = 0; i < size(); i++) ret.unite(at(i).coordinates()); return ret;