aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--demo.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/demo.c b/demo.c
index 6e635ca..96e2d24 100644
--- a/demo.c
+++ b/demo.c
@@ -6,6 +6,11 @@ int main(int argc, char *argv[]) {
char buffer[50];
termkey_t *tk = termkey_new(0, 0);
+ if(!tk) {
+ fprintf(stderr, "Cannot allocate termkey instance\n");
+ exit(1);
+ }
+
termkey_result ret;
termkey_key key;