Don't presume a sheet-path while reading files.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14920
This commit is contained in:
Jeff Young 2023-06-12 13:41:25 +01:00
parent b7f0aae006
commit a3f62cc8de
1 changed files with 1 additions and 1 deletions

View File

@ -1344,7 +1344,7 @@ bool SCH_SYMBOL::ResolveTextVar( const SCH_SHEET_PATH* aPath, wxString* token, i
} }
// See if parent can resolve it (this will recurse to ancestors) // See if parent can resolve it (this will recurse to ancestors)
if( aPath->Last()->ResolveTextVar( aPath, token, aDepth + 1 ) ) if( aPath->Last() && aPath->Last()->ResolveTextVar( aPath, token, aDepth + 1 ) )
return true; return true;
return false; return false;