Added a null pointer guard when getting the tree selection
authorChristos Stathis <chstath@ebs.gr>
Wed, 25 Apr 2012 13:04:23 +0000 (16:04 +0300)
committerChristos Stathis <chstath@ebs.gr>
Wed, 25 Apr 2012 13:04:23 +0000 (16:04 +0300)
src/gr/grnet/pithos/web/client/Pithos.java

index 77778db..efc25d5 100644 (file)
@@ -1090,7 +1090,9 @@ public class Pithos implements EntryPoint, ResizeHandler {
        }
 
        public Folder getSelection() {
-               return selectedTree.getSelection();
+               if (selectedTree != null)
+                       return selectedTree.getSelection();
+               return null;
        }
 
        public void showFolderStatistics(int folderFileCount) {