commit 5cce53b5a858a77a2fc600bcc0ff3760ad88504c
parent 5f36c3760ff90b5ef57d68cb9f0ef173f93f480f
Author: Chris Allegretta <chrisa@asty.org>
Date: Tue, 17 Jul 2001 10:42:50 +0000
do_writeout() - Check for open_files == NULL before using it (Ryan Krebs)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@734 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Diffstat:
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git 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
@@ -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);
}