+2007-12-10 David Lawrence Ramsey <pooka109@gmail.com>
+
+ * nano.c (main): Exit if initscr() fails.
+
2007-12-09 David Lawrence Ramsey <pooka109@gmail.com>
* faq.html: Add minor punctuation and wording fixes, and update
free(backup_dir);
backup_dir = backup_dir_cpy;
}
-#endif
+#endif
#ifndef DISABLE_JUSTIFY
if (quotestr_cpy != NULL) {
free(quotestr);
/* Back up the old terminal settings so that they can be restored. */
tcgetattr(0, &oldterm);
- /* Initialize curses mode. */
- initscr();
+ /* Initialize curses mode. If this fails, get out. */
+ if (initscr() == NULL)
+ exit(1);
/* Set up the terminal state. */
terminal_init();