git-svn-id: svn://svn.savannah.gnu.org/nano/branches/nano_2_4_branch@5414
35c25a1d-7b9e-4130-9fde-
d3aeb78583b8
+2015-08-11 Benno Schulenberg <bensberg@justemail.net>
+ * src/files.c (write_file): Avoid calling copy_file() with a null
+ pointer. Found with cppcheck.
+
2015-08-08 Benno Schulenberg <bensberg@justemail.net>
* src/winio.c (display_string): For some reason the reallocation done
by null_at() messes things up. So put in the null byte "manually".
}
}
- if (copy_file(f_source, f) != 0) {
+ if (f_source == NULL || copy_file(f_source, f) != 0) {
statusbar(_("Error writing %s: %s"), tempname,
strerror(errno));
unlink(tempname);