summaryrefslogtreecommitdiff
path: root/gnu/lib/libdialog/prgbox.c
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>1994-10-31 04:02:31 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>1994-10-31 04:02:31 +0000
commit9570a6deea08f1b8f2c473b6c0f13b46e996b13d (patch)
tree115afe490333a65e6fee8362c8433184afeb7fd3 /gnu/lib/libdialog/prgbox.c
parentbb5e714cf250986f8cb90c3af44db31db1a153f0 (diff)
Notes
Diffstat (limited to 'gnu/lib/libdialog/prgbox.c')
-rw-r--r--gnu/lib/libdialog/prgbox.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gnu/lib/libdialog/prgbox.c b/gnu/lib/libdialog/prgbox.c
index d95ffdb1b04c..db825890a301 100644
--- a/gnu/lib/libdialog/prgbox.c
+++ b/gnu/lib/libdialog/prgbox.c
@@ -43,6 +43,11 @@ int dialog_prgbox(unsigned char *title, const char *line, int height, int width,
draw_shadow(stdscr, y, x, height, width);
#endif
dialog = newwin(height, width, y, x);
+ if (dialog == NULL) {
+ endwin();
+ fprintf(stderr, "\nnewwin(%d,%d,%d,%d) failed, maybe wrong dims\n", height,width,y,x);
+ exit(1);
+ }
keypad(dialog, TRUE);
draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr);