diff --git a/Ghidra/Framework/Docking/src/main/java/docking/ComponentProvider.java b/Ghidra/Framework/Docking/src/main/java/docking/ComponentProvider.java index 521b6c2452..6427e1ac17 100644 --- a/Ghidra/Framework/Docking/src/main/java/docking/ComponentProvider.java +++ b/Ghidra/Framework/Docking/src/main/java/docking/ComponentProvider.java @@ -170,8 +170,11 @@ public abstract class ComponentProvider implements HelpDescriptor, ActionContext */ public boolean isFocusedProvider() { DockingWindowManager dwm = DockingWindowManager.getInstance(getComponent()); + if (dwm == null) { + return false; // can happen in testing + } ComponentPlaceholder placeholder = dwm.getFocusedComponent(); - return placeholder.getProvider() == this; + return placeholder != null && placeholder.getProvider() == this; } /**