瀏覽代碼

wxGUI: quick fix for https://trac.osgeo.org/grass/ticket/1565

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@52818 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 12 年之前
父節點
當前提交
8ea85f69d0
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      gui/wxpython/gui_core/goutput.py

+ 4 - 1
gui/wxpython/gui_core/goutput.py

@@ -896,7 +896,10 @@ class GMConsole(wx.SplitterWindow):
                     event.cmd[0] == 'r.mapcalc':
                 return
             
-            display = self.parent.GetLayerTree().GetMapDisplay()
+            tree = self.parent.GetLayerTree()
+            display = None
+            if tree:
+                display = tree.GetMapDisplay()
             if not display or not display.IsAutoRendered():
                 return
             mapLayers = map(lambda x: x.GetName(),