From aedcedb74e4a16ad6e9dff8aafb6ffd7b5581dc0 Mon Sep 17 00:00:00 2001 From: LukeFZ <17146677+LukeFZ@users.noreply.github.com> Date: Thu, 19 Mar 2026 14:57:54 +0100 Subject: [PATCH] check if MethodPointers and InvokerIndices are null before reading --- Il2CppInspector.Common/IL2CPP/Il2CppBinary.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Il2CppInspector.Common/IL2CPP/Il2CppBinary.cs b/Il2CppInspector.Common/IL2CPP/Il2CppBinary.cs index 52f41ab..5029bdf 100644 --- a/Il2CppInspector.Common/IL2CPP/Il2CppBinary.cs +++ b/Il2CppInspector.Common/IL2CPP/Il2CppBinary.cs @@ -334,7 +334,7 @@ namespace Il2CppInspector // If a module contains only interfaces, abstract methods and/or non-concrete generic methods, // the entire method pointer array will be NULL values, causing the methodPointer to be mapped to .bss // and therefore out of scope of the binary image - if (Image.TryMapVATR(module.MethodPointers, out _)) + if (module.MethodPointers != 0 && Image.TryMapVATR(module.MethodPointers, out _)) { try { @@ -351,7 +351,7 @@ namespace Il2CppInspector } // Read method invoker pointer indices - one per method - if (Image.TryMapVATR(module.InvokerIndices, out _)) + if (module.InvokerIndices != 0 && Image.TryMapVATR(module.InvokerIndices, out _)) { try {