don't coredump if we call endwin when initscr fails.

This commit is contained in:
christos 2016-11-24 14:49:08 +00:00
parent 97151ea665
commit 50c795e166

View File

@ -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;