From 2a8ea25209b8cedd6c0246ab2e545ff67e5ed5b0 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Tue, 3 Nov 2020 15:44:52 +0000 Subject: [PATCH] Null pointer safety. Fixes https://gitlab.com/kicad/code/kicad/issues/6263 --- eeschema/tools/backannotate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eeschema/tools/backannotate.cpp b/eeschema/tools/backannotate.cpp index 4ac499256a..f1d0b63aa9 100644 --- a/eeschema/tools/backannotate.cpp +++ b/eeschema/tools/backannotate.cpp @@ -370,7 +370,7 @@ void BACK_ANNOTATE::applyChangelist() const wxString& pinNumber = entry.first; const wxString& shortNetName = entry.second; SCH_PIN* pin = comp->GetPin( pinNumber ); - SCH_CONNECTION* conn = pin->Connection( &ref.GetSheetPath() ); + SCH_CONNECTION* conn = pin ? pin->Connection( &ref.GetSheetPath() ) : nullptr; wxString key = shortNetName + ref.GetSheetPath().PathAsString();