Eagle SCH import: do not crash if nothing was imported
This commit is contained in:
parent
a12b9db584
commit
e789523632
|
@ -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();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue