From 0645442704498d2b91d895c2e787be7c4b87a357 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Tue, 4 Feb 2020 04:50:23 -0600 Subject: [PATCH] eeschema: Fix crash in CheckAnnotate() CheckAnnotate cannot do anything to an empty schematic, so abort before referencing the list --- eeschema/annotate.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eeschema/annotate.cpp b/eeschema/annotate.cpp index a31cb65397..99a6c98a05 100644 --- a/eeschema/annotate.cpp +++ b/eeschema/annotate.cpp @@ -254,5 +254,9 @@ int SCH_EDIT_FRAME::CheckAnnotate( REPORTER& aReporter, bool aOneSheetOnly ) else g_CurrentSheet->GetComponents( componentsList ); + // Empty schematic does not need annotation + if( componentsList.GetCount() == 0 ) + return 0; + return componentsList.CheckAnnotation( aReporter ); }