浏览代码

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 年之前
父节点
当前提交
9820229eaf
共有 1 个文件被更改,包括 1 次插入1 次删除
  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])