Explorar o código

wxGUI: fix layertree error when switching to different location (merge from trunk, https://trac.osgeo.org/grass/changeset/64858)

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@64859 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová %!s(int64=10) %!d(string=hai) anos
pai
achega
5d0360bcb2
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      gui/wxpython/lmgr/layertree.py

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

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