From ed395c8aced47353350ab6f84308eb380a71b45c Mon Sep 17 00:00:00 2001 From: Gustas <37534529+PunkPun@users.noreply.github.com> Date: Sun, 11 Jun 2023 21:45:42 +0300 Subject: [PATCH] Fix linter crashing on null actor array references --- OpenRA.Mods.Common/Lint/CheckActorReferences.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OpenRA.Mods.Common/Lint/CheckActorReferences.cs b/OpenRA.Mods.Common/Lint/CheckActorReferences.cs index 6d8f1f9a95..6926bf53a0 100644 --- a/OpenRA.Mods.Common/Lint/CheckActorReferences.cs +++ b/OpenRA.Mods.Common/Lint/CheckActorReferences.cs @@ -57,6 +57,9 @@ namespace OpenRA.Mods.Common.Lint FieldInfo fieldInfo, IReadOnlyDictionary dict, ActorReferenceAttribute attribute) { var values = LintExts.GetFieldValues(traitInfo, fieldInfo, attribute.DictionaryReference); + if (values == null) + return; + foreach (var value in values) { if (value == null)