From d8eca5eff70a08db51481a685b792c646b77ff03 Mon Sep 17 00:00:00 2001 From: Liu Wenyuan <15816141883@163.com> Date: Sun, 13 Oct 2024 20:53:55 +0800 Subject: [PATCH] Don't let CodeLocals be nullable in reference finding code Co-authored-by: zivmaor <63353113+zivmaor@users.noreply.github.com> --- .../UndertaleResourceReferenceMethodsMap.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UndertaleModTool/Windows/FindReferencesTypesDialog/UndertaleResourceReferenceMethodsMap.cs b/UndertaleModTool/Windows/FindReferencesTypesDialog/UndertaleResourceReferenceMethodsMap.cs index e0de674a1..269fbb0d0 100644 --- a/UndertaleModTool/Windows/FindReferencesTypesDialog/UndertaleResourceReferenceMethodsMap.cs +++ b/UndertaleModTool/Windows/FindReferencesTypesDialog/UndertaleResourceReferenceMethodsMap.cs @@ -617,7 +617,7 @@ IEnumerable GetExtnFunctions() if (objSrc is not UndertaleString obj) return null; - var codeLocals = data.CodeLocals?.Where(x => x.Name == obj || x.Locals.Any(l => l.Name == obj)); + var codeLocals = data.CodeLocals.Where(x => x.Name == obj || x.Locals.Any(l => l.Name == obj)); if (codeLocals.Any()) return new() { { "Code locals", checkOne ? codeLocals.ToEmptyArray() : codeLocals.ToArray() } }; else