added ASSERT_RETURN to playerinput constructor
This commit is contained in:
parent
5d8d996c91
commit
51b889c6ef
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue