X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=src%2Fpath.cpp;h=f12e2a7829c0bc941d740da1ae5b800b7a47dd44;hb=3917214a11bf76381ddc528e3fe51de9ec038d42;hp=589c5099606f128089c610125034495682b26158;hpb=dfba002efc3b5f126ddb69e63b9a7dafdd9eacda;p=ipdf%2Fcode.git diff --git a/src/path.cpp b/src/path.cpp index 589c509..f12e2a7 100644 --- a/src/path.cpp +++ b/src/path.cpp @@ -14,13 +14,15 @@ Path::Path(const Objects & objects, unsigned start, unsigned end, const Colour & // Find the bounds coordinates // and identify the top left and bottom right objects - unsigned left; - unsigned right; - unsigned top; - unsigned bottom; + unsigned left = m_start; + unsigned right = m_start; + unsigned top = m_start; + unsigned bottom = m_start; for (unsigned i = m_start; i <= m_end; ++i) { + if (i >= objects.bounds.size()) + break; const Rect & objb = objects.bounds[i]; if (i == m_start || objb.x < xmin)