Browse Source

d.mon: Do not clear an existing output file on fatal error (#1452)

Huidae Cho 4 years ago
parent
commit
8a022e1769
1 changed files with 1 additions and 3 deletions
  1. 1 3
      display/d.mon/start.c

+ 1 - 3
display/d.mon/start.c

@@ -47,11 +47,9 @@ char *start(const char *name, const char *output, int width, int height, int upd
                 D_setup_unity(0);
                 D_erase("white");
             }
-            else {
-                D_close_driver();
+            else
                 G_fatal_error(_("option <%s>: <%s> exists. To overwrite, use the --overwrite flag"),
                               "output", output_name);
-            }
         }
         D_close_driver(); /* must be called after check because this
                            * function produces default map file */