From 6cdc3664bac2a8da0675cd0a5c1292ce123a54b8 Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Thu, 4 Mar 2021 18:21:41 -0500 Subject: [PATCH] Symbol editor: fix crash whe changing symbol name. Fixes https://gitlab.com/kicad/code/kicad/issues/7791 --- eeschema/symbol_editor/symbol_library_manager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eeschema/symbol_editor/symbol_library_manager.cpp b/eeschema/symbol_editor/symbol_library_manager.cpp index d24efef3e2..c3a34c0076 100644 --- a/eeschema/symbol_editor/symbol_library_manager.cpp +++ b/eeschema/symbol_editor/symbol_library_manager.cpp @@ -897,7 +897,8 @@ bool SYMBOL_LIBRARY_MANAGER::LIB_BUFFER::SaveBuffer( SYMBOL_LIBRARY_MANAGER::PAR // Delete the original symbol if the symbol name has been changed. if( part->GetName() != originalPart->GetName() ) { - aLibTable->DeleteSymbol( m_libName, originalPart->GetName() ); + if( aLibTable->LoadSymbol( m_libName, originalPart->GetName() ) ) + aLibTable->DeleteSymbol( m_libName, originalPart->GetName() ); } if( part->IsAlias() )