Fix error with empty sheet paths.

This commit is contained in:
Jeff Young 2020-11-02 18:05:56 +00:00
parent 20bb3b194f
commit c1ecb4257d
1 changed files with 4 additions and 1 deletions

View File

@ -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 )