]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.ui/src/org/simantics/scl/ui/modulebrowser/SCLModuleTree.java
(refs #7242) Fixed NPE in SCLModuleTree
[simantics/platform.git] / bundles / org.simantics.scl.ui / src / org / simantics / scl / ui / modulebrowser / SCLModuleTree.java
index 6ce186f2f76b58cf591a9085406206dc3f2750bb..acaffd0f565103cd2301e006794f84304961a574 100644 (file)
@@ -23,11 +23,14 @@ public class SCLModuleTree extends TreeViewer {
 
         @Override
         public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
-            this.rootEntry = createModuleTreeEntry((Collection<String>)newInput);
+            if(newInput != null)
+                this.rootEntry = createModuleTreeEntry((Collection<String>)newInput);
         }
 
         @Override
         public Object[] getElements(Object inputElement) {
+            if(rootEntry == null)
+                return new Object[0];
             return rootEntry.children().toArray();
         }