From c4132d02d8addd1fbbd0be6d65c9bdef6cb97973 Mon Sep 17 00:00:00 2001 From: ghidra007 Date: Wed, 30 Oct 2024 17:36:36 +0000 Subject: [PATCH] GP-5079 added null check to parentOffsetMap --- .../classrecovery/RTTIWindowsClassRecoverer.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Ghidra/Features/Decompiler/ghidra_scripts/classrecovery/RTTIWindowsClassRecoverer.java b/Ghidra/Features/Decompiler/ghidra_scripts/classrecovery/RTTIWindowsClassRecoverer.java index 0720dd7e58..15ac3d96a8 100644 --- a/Ghidra/Features/Decompiler/ghidra_scripts/classrecovery/RTTIWindowsClassRecoverer.java +++ b/Ghidra/Features/Decompiler/ghidra_scripts/classrecovery/RTTIWindowsClassRecoverer.java @@ -2454,7 +2454,11 @@ public class RTTIWindowsClassRecoverer extends RTTIClassRecoverer { Map parentOffsetMap = getBaseClassOffsetMap(recoveredClass); - return parentOffsetMap.get(virtualParentClasses.get(0)); + if (parentOffsetMap != null) { + return parentOffsetMap.get(virtualParentClasses.get(0)); + } + + return null; }