diff --git a/src/joystick/SDL_joystick.c b/src/joystick/SDL_joystick.c index 1972d13b7..1294100c7 100644 --- a/src/joystick/SDL_joystick.c +++ b/src/joystick/SDL_joystick.c @@ -113,6 +113,7 @@ SDL_Joystick *SDL_JoystickOpen(int device_index) /* Create and initialize the joystick */ joystick = (SDL_Joystick *)SDL_malloc((sizeof *joystick)); if ( !joystick ) { + SDL_OutOfMemory(); return(NULL); }