diff --git a/Ghidra/Framework/Docking/src/main/java/docking/DockableToolBarManager.java b/Ghidra/Framework/Docking/src/main/java/docking/DockableToolBarManager.java index 5ced712253..baa571478b 100644 --- a/Ghidra/Framework/Docking/src/main/java/docking/DockableToolBarManager.java +++ b/Ghidra/Framework/Docking/src/main/java/docking/DockableToolBarManager.java @@ -243,6 +243,9 @@ class DockableToolBarManager { @Override public boolean isEnabledForContext(ActionContext context) { DockingWindowManager dwm = DockingWindowManager.getActiveInstance(); + if (dwm == null) { + return false; // this can happen sometimes in test environments + } ComponentProvider provider = context.getComponentProvider(); if (provider == null) { // Some context providers do not specify the provider when creating a contexts