Don't eval empty string.

Fixes https://gitlab.com/kicad/code/kicad/issues/13756
This commit is contained in:
Jeff Young 2023-02-26 23:13:29 +00:00
parent 47cf26f047
commit 79f13ea9c7
1 changed files with 1 additions and 1 deletions

View File

@ -185,7 +185,7 @@ bool SIM_STRING_PROPERTY::StringToValue( wxVariant& aVariant, const wxString& aT
wxString text = aText; wxString text = aText;
if( allowEval() && m_needsEval && m_eval.Process( aText ) ) if( !aText.IsEmpty() && allowEval() && m_needsEval && m_eval.Process( aText ) )
{ {
double value = SIM_VALUE::ToDouble( m_eval.Result().ToStdString() ); double value = SIM_VALUE::ToDouble( m_eval.Result().ToStdString() );