Commit 5cce53b5 authored by Chris Allegretta's avatar Chris Allegretta
Browse files

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
No related merge requests found
Showing with 4 additions and 1 deletion
+4 -1
...@@ -2,6 +2,9 @@ CVS code - ...@@ -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
......
...@@ -1168,7 +1168,7 @@ int do_writeout(char *path, int exiting, int append) ...@@ -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);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment