summaryrefslogtreecommitdiffstats
path: root/curs_lib.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>1999-01-14 11:32:14 +0000
committerThomas Roessler <roessler@does-not-exist.org>1999-01-14 11:32:14 +0000
commitd455fa10e0ff12bdb5d2b2736200e89469db396c (patch)
treee7bc703e157e31256a7fa6671121a8e2f8c24d65 /curs_lib.c
parent8a665d15928e6201d5d2a50addc4bc0bf44bd735 (diff)
Fix a couple of segfaults related to using curses when it isn't there.
Diffstat (limited to 'curs_lib.c')
-rw-r--r--curs_lib.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/curs_lib.c b/curs_lib.c
index 6d8df4bc..de10a986 100644
--- a/curs_lib.c
+++ b/curs_lib.c
@@ -244,23 +244,24 @@ void mutt_show_error (void)
void mutt_endwin (const char *msg)
{
-
+ if (!option (OPTNOCURSES))
+ {
#ifdef SLANG_CURSES
- CLEARLINE (LINES - 1);
- move (LINES - 1, 0)
+ CLEARLINE (LINES - 1);
+ move (LINES - 1, 0)
#else
- move (LINES - 1, COLS - 1);
- CLEARLINE (LINES - 1);
+ move (LINES - 1, COLS - 1);
+ CLEARLINE (LINES - 1);
#endif
-
- attrset (A_NORMAL);
- mutt_refresh ();
- endwin ();
-
+
+ attrset (A_NORMAL);
+ mutt_refresh ();
+ endwin ();
#ifndef SLANG_CURSES
- fputc ('\n', stdout);
+ fputc ('\n', stdout);
#endif
-
+ }
+
if (msg)
puts (msg);
}