diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2013-10-02 14:23:02 -0700 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2013-10-02 14:23:02 -0700 |
commit | 06c411ef291e1f608487989b0da63aefbbdfefc1 (patch) | |
tree | 65725a849654e20c20a55eeead8cf4cea8e9cbea /src/map/map.cpp | |
parent | 59ce78ce5c6f7e40583aa2369842f323e182ff76 (diff) | |
download | tmwa-06c411ef291e1f608487989b0da63aefbbdfefc1.tar.gz tmwa-06c411ef291e1f608487989b0da63aefbbdfefc1.tar.bz2 tmwa-06c411ef291e1f608487989b0da63aefbbdfefc1.tar.xz tmwa-06c411ef291e1f608487989b0da63aefbbdfefc1.zip |
Make sure we don't log after the log is closed.
Diffstat (limited to 'src/map/map.cpp')
-rw-r--r-- | src/map/map.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/map/map.cpp b/src/map/map.cpp index 25b70dc..cff97e2 100644 --- a/src/map/map.cpp +++ b/src/map/map.cpp @@ -1360,6 +1360,7 @@ void map_close_logfile(void) char **argv = const_cast<char **>(args); fclose(map_logfile); + map_logfile = NULL; if (!fork()) { @@ -1583,8 +1584,6 @@ void cleanup_sub(dumb_ptr<block_list> bl) */ void term_func(void) { - map_close_logfile(); - for (auto& mit : maps_db) { if (!mit.second->gat) @@ -1608,6 +1607,8 @@ void term_func(void) do_final_script(); do_final_itemdb(); do_final_storage(); + + map_close_logfile(); } /// --help was passed |