X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.browsing.ui.swt%2Fsrc%2Forg%2Fsimantics%2Fbrowsing%2Fui%2Fswt%2FGraphExplorerToolTip.java;h=1debee624e803ae51d95622c6c983c041fc16872;hp=26e4431038d3b43da160aad78d74b9884ef572fc;hb=12468c2b3d87f61123d6429a7329d80316009fe6;hpb=96bb7ef9cbe42d82eb58306d8f9b62392cc29ba8 diff --git a/bundles/org.simantics.browsing.ui.swt/src/org/simantics/browsing/ui/swt/GraphExplorerToolTip.java b/bundles/org.simantics.browsing.ui.swt/src/org/simantics/browsing/ui/swt/GraphExplorerToolTip.java index 26e443103..1debee624 100644 --- a/bundles/org.simantics.browsing.ui.swt/src/org/simantics/browsing/ui/swt/GraphExplorerToolTip.java +++ b/bundles/org.simantics.browsing.ui.swt/src/org/simantics/browsing/ui/swt/GraphExplorerToolTip.java @@ -42,9 +42,12 @@ public class GraphExplorerToolTip extends ToolTip { @Override protected boolean shouldCreateToolTip(Event event) { TreeItem treeItem = parent.getItem(new Point(event.x, event.y)); + if (treeItem == null) + return false; GENodeQueryManager manager = new GENodeQueryManager(explorerContext, null, null, TreeItemReference.create(treeItem.getParentItem())); nodeContext = (NodeContext) treeItem.getData(); - labeler = manager.query(nodeContext, BuiltinKeys.SELECTED_LABELER); + if (nodeContext != null) + labeler = manager.query(nodeContext, BuiltinKeys.SELECTED_LABELER); if (nodeContext == null || !(labeler instanceof LabelerStub)) return false; return ((LabelerStub) labeler).shouldCreateToolTip(event, nodeContext);