Browse Source

wxGUI: fix layertree error when switching to different location

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@64858 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 10 years ago
parent
commit
944c0bb3c1
1 changed files with 2 additions and 0 deletions
  1. 2 0
      gui/wxpython/lmgr/layertree.py

+ 2 - 0
gui/wxpython/lmgr/layertree.py

@@ -1726,6 +1726,8 @@ class LayerTree(treemixin.DragAndDrop, CT.CustomTreeCtrl):
     def GetVisibleLayers(self, skipDigitized=False):
     def GetVisibleLayers(self, skipDigitized=False):
         # make a list of visible layers
         # make a list of visible layers
         layers = []
         layers = []
+        if self.root is None:
+            return layers
 
 
         vislayer = self.GetFirstChild(self.root)[0]
         vislayer = self.GetFirstChild(self.root)[0]