From d0c3c11e5956e4db9f713b1e955e3a5cd4d49976 Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Wed, 6 May 2020 10:42:50 -0400 Subject: [PATCH] Eeschema: fix crash when resetting schematic symbol fields from library. Fixes https://gitlab.com/kicad/code/kicad/issues/4336 --- eeschema/dialogs/dialog_edit_component_in_schematic.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp index c4939ed21e..9fea5b5d20 100644 --- a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp +++ b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp @@ -692,7 +692,7 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::UpdateFieldsFromLibrary( wxCommandEvent return; } - m_cmp->SetLibSymbol( new LIB_PART( *libSymbol ) ); + copy.SetLibSymbol( libSymbol->Flatten().release() ); // Update the requested fields in the component copy std::list components;