diff --git a/ChangeLog b/ChangeLog index 9f6958f66bd17d4cdae2866da695cf935279ee84..f67198a639b411a1be927d17e8e45a2c9399c01e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,9 @@ CVS code - - nano.c: main() - Change the getop option to 'F' (David Lawrence Ramsey) +- files.c: + do_writeout() + - Check for open_files == NULL before using it (Ryan Krebs) - global.c: shortcut_init() - Rewrote the whereis and replace lists to put CANCEL at the end diff --git a/files.c b/files.c index 3b804a57d98683d22be24007f04efc87284f6816..f35e69ae176aeeb11108d13f6e2a76053266d8b5 100644 --- a/files.c +++ b/files.c @@ -1168,7 +1168,7 @@ int do_writeout(char *path, int exiting, int append) update the filename and full path stored in the current entry, and then update the current entry, checking for duplicate entries */ - if (strcmp(open_files->data, filename)) { + if (open_files != NULL && strcmp(open_files->data, filename)) { open_file_change_name(); add_open_file(1, 1); }