]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Adding column data to tooltip event could cause NPE 14/2314/1
authorMarko Luukkainen <marko.luukkainen@semantum.fi>
Tue, 16 Oct 2018 07:28:07 +0000 (10:28 +0300)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Tue, 16 Oct 2018 07:46:10 +0000 (07:46 +0000)
gitlab #146

Change-Id: I4ce48cc851638fd5cd38bab77763fdfec9c48ed9
(cherry picked from commit f024c0a7208e379a82f0ab51a71a123f9bb2a2bb)

bundles/org.simantics.browsing.ui.swt/src/org/simantics/browsing/ui/swt/GraphExplorerToolTip.java

index 0cc2e71a8c768ddce6c08a2a85cb648794b0a4e5..ba42e58927464122a0a9df43c8665cedaf69737a 100644 (file)
@@ -57,7 +57,9 @@ public class GraphExplorerToolTip extends ToolTip {
             }
             x+=w;
         }
-        event.data = column.getData();
+        if (column != null)
+               event.data = column.getData();
+        
         GENodeQueryManager manager = new GENodeQueryManager(explorerContext, null, null, TreeItemReference.create(treeItem.getParentItem()));
         nodeContext = (NodeContext) treeItem.getData();
         if (nodeContext != null)