From 01c5fab84b5c577beeacf30b16b411cf9a6aa0ab Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Tue, 31 Oct 2023 22:11:46 -0400 Subject: [PATCH] Enforce symbol name not being empty Fixes https://gitlab.com/kicad/code/kicad/-/issues/15859 (cherry picked from commit e14e7e0bd9ea349dc3e4e3e8525376f8270c6962) --- eeschema/dialogs/dialog_lib_symbol_properties.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/eeschema/dialogs/dialog_lib_symbol_properties.cpp b/eeschema/dialogs/dialog_lib_symbol_properties.cpp index 5814f874ff..35745f6e29 100644 --- a/eeschema/dialogs/dialog_lib_symbol_properties.cpp +++ b/eeschema/dialogs/dialog_lib_symbol_properties.cpp @@ -361,6 +361,12 @@ bool DIALOG_LIB_SYMBOL_PROPERTIES::TransferDataFromWindow() wxString newName = EscapeString( m_SymbolNameCtrl->GetValue(), CTX_LIBID ); wxString oldName = m_libEntry->GetName(); + if( newName.IsEmpty() ) + { + wxMessageBox( _( "Symbol must have a name." ) ); + return false; + } + if( oldName != newName ) { wxString libName = m_Parent->GetCurLib();