Call SDL_OutOfMemory() if SDL_malloc() fails.
--HG-- branch : SDL-1.2 extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404359
This commit is contained in:
parent
dc6fc53763
commit
3bb17ca192
1 changed files with 1 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue