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
master
Chris Allegretta 2001-07-17 10:42:50 +00:00
parent 5f36c3760f
commit 5cce53b5a8
2 changed files with 4 additions and 1 deletions

View File

@ -2,6 +2,9 @@ CVS code -
- nano.c: - nano.c:
main() main()
- Change the getop option to 'F' (David Lawrence Ramsey) - 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: - global.c:
shortcut_init() shortcut_init()
- Rewrote the whereis and replace lists to put CANCEL at the end - Rewrote the whereis and replace lists to put CANCEL at the end

View File

@ -1168,7 +1168,7 @@ int do_writeout(char *path, int exiting, int append)
update the filename and full path stored in the update the filename and full path stored in the
current entry, and then update the current entry, current entry, and then update the current entry,
checking for duplicate entries */ checking for duplicate entries */
if (strcmp(open_files->data, filename)) { if (open_files != NULL && strcmp(open_files->data, filename)) {
open_file_change_name(); open_file_change_name();
add_open_file(1, 1); add_open_file(1, 1);
} }