shutdown: don't refer to an open file when there aren't any

This fixes https://savannah.gnu.org/bugs/?57780.

Bug existed since commit b63c90bf from yesterday.
master
Benno Schulenberg 2020-02-10 09:24:35 +01:00
parent 422cd726fa
commit cbeea859c2
1 changed files with 1 additions and 2 deletions

View File

@ -340,9 +340,8 @@ void finish(void)
/* If the user wants history persistence, write the relevant files. */
if (ISSET(HISTORYLOG))
save_history();
if (ISSET(POSITIONLOG)) {
if (ISSET(POSITIONLOG) && openfile)
update_poshistory(openfile->filename, openfile->current->lineno, xplustabs() + 1);
}
#endif
/* Get out. */