Skip to content

Ghidra is a software reverse engineering (SRE) framework

GP-756 - Function Graph - fixed exception that can happen when showing a graph popup for a component that was hidden before the timer expired

dragonmacher1c356782d4bf
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/hover/AbstractHoverProvider.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/hover/AbstractHoverProvider.java
index 564268be37..3eccd3e4bf 100644
--- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/hover/AbstractHoverProvider.java
+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/hover/AbstractHoverProvider.java
@@ -139,6 +139,13 @@ public abstract class AbstractHoverProvider implements HoverProvider {
return;
}
+ Component component = event.getComponent();
+ if (!component.isShowing()) {
+ // This can happen since we are using a timer. When the timer fires, the source
+ // component may have been hidden.
+ return;
+ }
+
ProgramLocation loc = getHoverLocation(fieldLocation, field, fieldBounds, event);
for (HoverService hoverService : hoverServices) {
JComponent comp = hoverService.getHoverComponent(program, loc, fieldLocation, field);