From 78d3e8d3aba44f59f7ee389ea44fe5cadeabb29c Mon Sep 17 00:00:00 2001 From: Dan <46821332+nsadeveloper789@users.noreply.github.com> Date: Thu, 14 Apr 2022 17:30:49 -0400 Subject: [PATCH] GP-1905: Fix NPE when changing register-tracking setting in dynamic listing. --- .../core/debug/gui/action/DebuggerTrackLocationTrait.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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); } }