diff options
Diffstat (limited to 'gnu/lib/libdialog/msgbox.c')
| -rw-r--r-- | gnu/lib/libdialog/msgbox.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gnu/lib/libdialog/msgbox.c b/gnu/lib/libdialog/msgbox.c index c56b58b41c8d..e405f3b5a26a 100644 --- a/gnu/lib/libdialog/msgbox.c +++ b/gnu/lib/libdialog/msgbox.c @@ -41,6 +41,11 @@ int dialog_msgbox(unsigned char *title, unsigned char *prompt, int height, int w 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); |
