diff --git a/core/src/player_input.c b/core/src/player_input.c index d8220f8..55d1efc 100644 --- a/core/src/player_input.c +++ b/core/src/player_input.c @@ -1,7 +1,9 @@ #include "player_input.h" +#include "debug.h" PlayerInput* playerinput_new(void* target, int device) { PlayerInput* self = malloc(sizeof(PlayerInput)); + ASSERT_RETURN(self != NULL, NULL, "Could not allocate memory for PlayerInput instance"); self->listeners = list_from_type(InputListener); self->device = input_get_device_by_id(device); self->target = target;