mirror of
https://github.com/yawut/SDL.git
synced 2026-10-02 05:06:46 -05:00
Call SDL_OutOfMemory() if SDL_malloc() fails.
--HG-- branch : SDL-1.2
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user