From ed3e79325f5e6edd5319e16c6d522c12790248b0 Mon Sep 17 00:00:00 2001 From: Andrey Fedorushkov Date: Sat, 13 Oct 2012 22:33:58 +0400 Subject: [PATCH] eeschema: fix segfault when edit text and empty editing text --- eeschema/dialogs/dialog_edit_label.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eeschema/dialogs/dialog_edit_label.cpp b/eeschema/dialogs/dialog_edit_label.cpp index 1e5a2f7fcd..4c2afb02b4 100644 --- a/eeschema/dialogs/dialog_edit_label.cpp +++ b/eeschema/dialogs/dialog_edit_label.cpp @@ -257,7 +257,10 @@ void DIALOG_LABEL_EDITOR::TextPropertiesAccept( wxCommandEvent& aEvent ) if( !text.IsEmpty() ) m_CurrentText->m_Text = text; else if( !m_CurrentText->IsNew() ) + { DisplayError( this, _( "Empty Text!" ) ); + return; + } m_CurrentText->SetOrientation( m_TextOrient->GetSelection() ); text = m_TextSize->GetValue();