From e7895236322880f10b237a829090df45fceffb4b Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 29 May 2018 09:27:11 +0200 Subject: [PATCH] Eagle SCH import: do not crash if nothing was imported --- eeschema/sch_eagle_plugin.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eeschema/sch_eagle_plugin.cpp b/eeschema/sch_eagle_plugin.cpp index b2b09ce48b..ac1373857d 100644 --- a/eeschema/sch_eagle_plugin.cpp +++ b/eeschema/sch_eagle_plugin.cpp @@ -92,8 +92,11 @@ static int countChildren( wxXmlNode* aCurrentNode, const wxString& aName ) static EDA_RECT getSheetBbox( SCH_SHEET* aSheet ) { EDA_RECT bbox; - SCH_ITEM* item = aSheet->GetScreen()->GetDrawItems(); + + if( !item ) + return bbox; + bbox = item->GetBoundingBox(); item = item->Next();