mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
Don't try and GetChar() on a empty field.
This commit is contained in:
parent
51377cbf41
commit
4b00114316
@ -738,7 +738,8 @@ int SCH_SHEET::SymbolCount() const
|
||||
{
|
||||
SCH_SYMBOL* symbol = (SCH_SYMBOL*) aItem;
|
||||
|
||||
if( symbol->GetField( FIELD_T::VALUE )->GetText().GetChar( 0 ) != '#' )
|
||||
wxString value = symbol->GetField( FIELD_T::VALUE )->GetText();
|
||||
if( !value.empty() && value.GetChar( 0 ) != '#' )
|
||||
n++;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user