Eagle SCH import: do not crash if nothing was imported

This commit is contained in:
Maciej Suminski 2018-05-29 09:27:11 +02:00
parent a12b9db584
commit e789523632
1 changed files with 4 additions and 1 deletions

View File

@ -92,8 +92,11 @@ static int countChildren( wxXmlNode* aCurrentNode, const wxString& aName )
static EDA_RECT getSheetBbox( SCH_SHEET* aSheet ) static EDA_RECT getSheetBbox( SCH_SHEET* aSheet )
{ {
EDA_RECT bbox; EDA_RECT bbox;
SCH_ITEM* item = aSheet->GetScreen()->GetDrawItems(); SCH_ITEM* item = aSheet->GetScreen()->GetDrawItems();
if( !item )
return bbox;
bbox = item->GetBoundingBox(); bbox = item->GetBoundingBox();
item = item->Next(); item = item->Next();