Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Call SDL_OutOfMemory() if SDL_malloc() fails.
- Loading branch information
Showing
with
1 addition
and
0 deletions.
-
+1
−0
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); |
|
|
} |
|
|
|
|
|