diff --git a/src/info.cpp b/src/info.cpp index bc7840ac43..c34eb401cd 100644 --- a/src/info.cpp +++ b/src/info.cpp @@ -104,6 +104,7 @@ void Info::command(int narg, char **arg) ++idx; } else if ((idx+1 < narg) && (strncmp(arg[idx],"out",3) == 0) && (strncmp(arg[idx+1],"screen",3) == 0)) { + if ((out != screen) && (out != logfile)) fclose(out); out = screen; idx += 2; } else if ((idx+1 < narg) && (strncmp(arg[idx],"out",3) == 0)