Skip to content

Ghidra is a software reverse engineering (SRE) framework

GP-1905: Fix NPE when changing register-tracking setting in dynamic listing.

Dan78d3e8d3aba4
diff --git a/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/action/DebuggerTrackLocationTrait.java b/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/action/DebuggerTrackLocationTrait.java
index 32270ca5ad..f023da0417 100644
--- a/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/action/DebuggerTrackLocationTrait.java
+++ b/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/action/DebuggerTrackLocationTrait.java
@@ -191,8 +191,11 @@ public class DebuggerTrackLocationTrait {
}
public void setSpec(LocationTrackingSpec spec) {
- // TODO: What if action == null?
- if (action != null) {
+ if (action == null) {
+ // It might if the client doesn't need a new button, e.g., TraceDiff
+ doSetSpec(spec);
+ }
+ else {
action.setCurrentActionStateByUserData(spec);
}
}