From ce9bd780d169edec34d8d7a397c908a16e417ce6 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Fri, 15 Apr 2022 14:56:18 -0700 Subject: [PATCH] Fix crash due to cleared view data When changing fields, we need to update the view before allowing canvas updates (cherry picked from commit 851f893e8e4c674cc7435b05ad20a249c90eb6de) --- eeschema/symbol_editor/symbol_editor.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eeschema/symbol_editor/symbol_editor.cpp b/eeschema/symbol_editor/symbol_editor.cpp index 9b64fba9ff..e9692f0e48 100644 --- a/eeschema/symbol_editor/symbol_editor.cpp +++ b/eeschema/symbol_editor/symbol_editor.cpp @@ -769,9 +769,12 @@ void SYMBOL_EDIT_FRAME::UpdateAfterSymbolProperties( wxString* aOldName ) RebuildSymbolUnitsList(); SetShowDeMorgan( GetCurSymbol()->Flatten()->HasConversion() ); updateTitle(); + + // N.B. The view needs to be rebuilt first as the Symbol Properties change may invalidate + // the view pointers by rebuilting the field table + RebuildView(); UpdateMsgPanel(); - RebuildView(); OnModify(); }