Tests - fix for failing FG test

This commit is contained in:
dragonmacher 2019-03-27 18:28:13 -04:00
parent 097cf2e758
commit 00a5a4dc01

View File

@ -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;
}
/**