summaryrefslogtreecommitdiff
path: root/gnu/lib/libdialog/prgbox.c
diff options
context:
space:
mode:
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);