eeschema: Fix crash in CheckAnnotate()

CheckAnnotate cannot do anything to an empty schematic, so abort before
referencing the list
This commit is contained in:
Seth Hillbrand 2020-02-04 04:50:23 -06:00
parent 9f7e0ef8e8
commit 0645442704
1 changed files with 4 additions and 0 deletions

View File

@ -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 );
}