summaryrefslogtreecommitdiffstats
path: root/lib/libforms/examples/test.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libforms/examples/test.c')
-rw-r--r--lib/libforms/examples/test.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/libforms/examples/test.c b/lib/libforms/examples/test.c
index 1fc3836..92e65a8 100644
--- a/lib/libforms/examples/test.c
+++ b/lib/libforms/examples/test.c
@@ -12,6 +12,7 @@
* its use.
*/
+#include <stdio.h>
#include "../forms.h"
main()
@@ -68,7 +69,11 @@ main()
initscr();
initfrm(&form);
-
+ if (!form.window) {
+ fprintf(stderr, "\nUnable to initialize forms library.\n");
+ endwin();
+ exit(1);
+ }
keypad(form.window, TRUE);
while (!(res = update_form(&form)));
OpenPOWER on IntegriCloud