Explorar o código

wxGUI: added check if overlay mapfile is not None (d.barscale with latlon projection caused error)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@52310 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová %!s(int64=12) %!d(string=hai) anos
pai
achega
7be26dc840
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      gui/wxpython/mapdisp/mapwindow.py

+ 2 - 1
gui/wxpython/mapdisp/mapwindow.py

@@ -508,7 +508,8 @@ class BufferedWindow(MapWindow, wx.Window):
         """
         imgs = []
         for overlay in self.Map.GetListOfLayers(l_type = "overlay", l_active = True):
-            if os.path.isfile(overlay.mapfile) and os.path.getsize(overlay.mapfile):
+            if overlay.mapfile is not None \
+               and os.path.isfile(overlay.mapfile) and os.path.getsize(overlay.mapfile):
                 img = wx.Image(overlay.mapfile, wx.BITMAP_TYPE_ANY)
                 self.imagedict[img] = { 'id' : overlay.id,
                                         'layer' : overlay }