From 00a5a4dc01b9c22656651ff370d518af99d3f7e5 Mon Sep 17 00:00:00 2001 From: dragonmacher Date: Wed, 27 Mar 2019 18:28:13 -0400 Subject: [PATCH] Tests - fix for failing FG test --- .../Docking/src/main/java/docking/ComponentProvider.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; } /**