From 3df27430c7a5630d07f2e343404abae33b83dd55 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 2 Jul 2018 21:02:27 +0200 Subject: [PATCH] Fix eeschema crash when updating fields from libraries, and when a symbol in schematic is not found in libs Fixes: lp:1779722 https://bugs.launchpad.net/kicad/+bug/1779722 --- eeschema/dialogs/dialog_update_fields.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eeschema/dialogs/dialog_update_fields.cpp b/eeschema/dialogs/dialog_update_fields.cpp index 4419993e6d..a2ac55af0b 100644 --- a/eeschema/dialogs/dialog_update_fields.cpp +++ b/eeschema/dialogs/dialog_update_fields.cpp @@ -135,6 +135,10 @@ void DIALOG_UPDATE_FIELDS::updateFields( SCH_COMPONENT* aComponent ) SCH_FIELDS newFields; PART_SPTR libPart = aComponent->GetPartRef().lock(); + + if( libPart == nullptr ) // the symbol is not found in lib: cannot update fields + return; + aComponent->GetFields( oldFields, false ); for( auto compField : oldFields )