Fix crash when fetching bounding box of empty selection.
This commit is contained in:
parent
f0cd7a5fd9
commit
41441d9ced
|
@ -155,13 +155,12 @@ public:
|
|||
{
|
||||
EDA_RECT bbox;
|
||||
|
||||
bbox = Front()->GetBoundingBox();
|
||||
auto i = m_items.begin();
|
||||
++i;
|
||||
|
||||
for( ; i != m_items.end(); ++i )
|
||||
if( Front() )
|
||||
{
|
||||
bbox.Merge( (*i)->GetBoundingBox() );
|
||||
bbox = Front()->GetBoundingBox();
|
||||
|
||||
for( auto i = m_items.begin() + 1; i != m_items.end(); ++i )
|
||||
bbox.Merge( (*i)->GetBoundingBox() );
|
||||
}
|
||||
|
||||
return bbox;
|
||||
|
|
Loading…
Reference in New Issue