Browse Source

wxGUI: don't crash when vdigit props are not set
(merge from devbr6, https://trac.osgeo.org/grass/changeset/38012)


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@38013 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa 16 years ago
parent
commit
43c1d497bc
1 changed files with 3 additions and 1 deletions
  1. 3 1
      gui/wxpython/gui_modules/mapdisp_window.py

+ 3 - 1
gui/wxpython/gui_modules/mapdisp_window.py

@@ -1177,7 +1177,9 @@ class BufferedWindow(MapWindow, wx.Window):
         """!Trac geometry attributes?"""
         item = self.tree.FindItemByData('maplayer', mapLayer)
         vdigit = self.tree.GetPyData(item)[0]['vdigit']
-        if vdigit.has_key('geomAttr') and vdigit['geomAttr'].has_key(attrb):
+        if vdigit and \
+                vdigit.has_key('geomAttr') and \
+                vdigit['geomAttr'].has_key(attrb):
             val = -1
             if attrb == 'length':
                 val = digit.GetLineLength(fid)