]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Merge "Fix selectPath returning true for nodes that haven't been loaded."
authorMarko Luukkainen <marko.luukkainen@semantum.fi>
Fri, 1 Feb 2019 13:24:08 +0000 (13:24 +0000)
committerGerrit Code Review <gerrit2@simantics>
Fri, 1 Feb 2019 13:24:08 +0000 (13:24 +0000)
bundles/org.simantics.browsing.ui.swt/src/org/simantics/browsing/ui/swt/GraphExplorerImpl.java

index df736c1e6dc2603315bea23f47b46a2170a52f55..40c21585a7d83c5b0b6c6d1c89f845528af3ed50 100644 (file)
@@ -3119,7 +3119,10 @@ class GraphExplorerImpl extends GraphExplorerImplBase implements Listener, Graph
        //System.out.println("NodeContext path : " + contexts);
 
        NodeContext head = tryFind(contexts[position]);
-
+       // tryFind may return null for positions, that actually have NodeContext. 
+       if (head == null)
+           return false;
+       
        if(position == contexts.length-1) {
                return select(head);