// 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)