+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-09 Benno Schulenberg <bensberg@justemail.net>
* src/global.c, src/help.c (help_init), src/nano.c (do_toggle, main),
src/winio.c (display_string, statusbar): Allow toggling the display
}
}
- 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);