Browse Source

wxGUI/d.mon: fix https://trac.osgeo.org/grass/changeset/59010

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@59011 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 11 years ago
parent
commit
9820229eaf
1 changed files with 1 additions and 1 deletions
  1. 1 1
      gui/wxpython/mapdisp/main.py

+ 1 - 1
gui/wxpython/mapdisp/main.py

@@ -103,7 +103,7 @@ class DMonMap(Map):
             lines = fd.readlines()
             fd.close()
             # detect d.out.file, delete the line from the cmd file and export graphics
-            if lines[-1].startswith('d.out.file'):
+            if len(lines) > 0 and lines[-1].startswith('d.out.file'):
                 dOutFileCmd = lines[-1].strip()
                 fd = open(self.cmdfile, 'w')
                 fd.writelines(lines[:-1])