Module Name: src
Committed By: christos
Date: Thu Nov 24 14:49:08 UTC 2016
Modified Files:
src/lib/libcurses: tstp.c
Log Message:
don't coredump if we call endwin when initscr fails.
To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/lib/libcurses/tstp.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libcurses/tstp.c
diff -u src/lib/libcurses/tstp.c:1.40 src/lib/libcurses/tstp.c:1.41
--- src/lib/libcurses/tstp.c:1.40 Tue Oct 15 09:00:52 2013
+++ src/lib/libcurses/tstp.c Thu Nov 24 09:49:08 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: tstp.c,v 1.40 2013/10/15 13:00:52 christos Exp $ */
+/* $NetBSD: tstp.c,v 1.41 2016/11/24 14:49:08 christos Exp $ */
/*
* Copyright (c) 1981, 1993, 1994
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)tstp.c 8.3 (Berkeley) 5/4/94";
#else
-__RCSID("$NetBSD: tstp.c,v 1.40 2013/10/15 13:00:52 christos Exp $");
+__RCSID("$NetBSD: tstp.c,v 1.41 2016/11/24 14:49:08 christos Exp $");
#endif
#endif /* not lint */
@@ -218,6 +218,8 @@ __stopwin(void)
#ifdef DEBUG
__CTRACE(__CTRACE_MISC, "__stopwin\n");
#endif
+ if (_cursesi_screen == NULL)
+ return ERR;
if (_cursesi_screen->endwin)
return OK;