eeschema: fix segfault when edit text and empty editing text

This commit is contained in:
Andrey Fedorushkov 2012-10-13 22:33:58 +04:00
parent eee9738755
commit cedcd2bace
1 changed files with 3 additions and 0 deletions

View File

@ -257,7 +257,10 @@ void DIALOG_LABEL_EDITOR::TextPropertiesAccept( wxCommandEvent& aEvent )
if( !text.IsEmpty() ) if( !text.IsEmpty() )
m_CurrentText->m_Text = text; m_CurrentText->m_Text = text;
else if( !m_CurrentText->IsNew() ) else if( !m_CurrentText->IsNew() )
{
DisplayError( this, _( "Empty Text!" ) ); DisplayError( this, _( "Empty Text!" ) );
return;
}
m_CurrentText->SetOrientation( m_TextOrient->GetSelection() ); m_CurrentText->SetOrientation( m_TextOrient->GetSelection() );
text = m_TextSize->GetValue(); text = m_TextSize->GetValue();