From af6c8d33ea5566b67a9225a191f4596535888029 Mon Sep 17 00:00:00 2001 From: Sara Date: Wed, 29 Nov 2023 14:14:01 +0100 Subject: [PATCH] feat: input error handling improved --- core/src/input.c | 1 + 1 file changed, 1 insertion(+) diff --git a/core/src/input.c b/core/src/input.c index a8f0e31..cf5c78f 100644 --- a/core/src/input.c +++ b/core/src/input.c @@ -7,6 +7,7 @@ static List _devices; static inline void _internal_open_keyboard() { InputDevice* keyboard = malloc(sizeof(InputDevice)); + ASSERT_RETURN(keyboard != NULL, , "Failed to allocate space for keyboard input device"); *keyboard = (InputDevice){ .listeners = NULL, .type = InputDevice_KBM,