Skip to content

Ghidra is a software reverse engineering (SRE) framework

Fixed stack trace when clicking a location mapped to an UndefinedFunction

dragonmacher04c0f0ef93e5
diff --git a/Ghidra/Features/Decompiler/src/main/java/ghidra/app/plugin/core/decompile/actions/AbstractDecompilerAction.java b/Ghidra/Features/Decompiler/src/main/java/ghidra/app/plugin/core/decompile/actions/AbstractDecompilerAction.java
index 3d301e8fe2..f8ef696b1c 100644
--- a/Ghidra/Features/Decompiler/src/main/java/ghidra/app/plugin/core/decompile/actions/AbstractDecompilerAction.java
+++ b/Ghidra/Features/Decompiler/src/main/java/ghidra/app/plugin/core/decompile/actions/AbstractDecompilerAction.java
@@ -31,6 +31,7 @@ import ghidra.program.model.pcode.*;
import ghidra.program.model.symbol.Symbol;
import ghidra.program.model.symbol.SymbolTable;
import ghidra.program.util.ProgramLocation;
+import ghidra.util.UndefinedFunction;
import ghidra.util.data.DataTypeParser.AllowedDataTypes;
/**
@@ -216,7 +217,7 @@ public abstract class AbstractDecompilerAction extends DockingAction {
// prefer the decompiler's function reference over the program location's address
Function function = getFunction(context);
- if (function != null) {
+ if (function != null && !(function instanceof UndefinedFunction)) {
return function.getSymbol();
}