From c1ecb4257d8b5cc746c1dcffab69b2d48d8c86fd Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Mon, 2 Nov 2020 18:05:56 +0000 Subject: [PATCH] Fix error with empty sheet paths. --- eeschema/sch_sheet_path.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eeschema/sch_sheet_path.cpp b/eeschema/sch_sheet_path.cpp index 199353de12..cf11c2697c 100644 --- a/eeschema/sch_sheet_path.cpp +++ b/eeschema/sch_sheet_path.cpp @@ -227,8 +227,11 @@ KIID_PATH SCH_SHEET_PATH::PathWithoutRootUuid() const wxString SCH_SHEET_PATH::PathHumanReadable( bool aUseShortRootName ) const { wxString s; + wxString fileName; + + if( !empty() && at( 0 )->GetScreen() ) + fileName = at( 0 )->GetScreen()->GetFileName(); - wxString fileName = at( 0 )->GetScreen()->GetFileName(); wxFileName fn = fileName; if( aUseShortRootName )