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:
Ryan C. Gordon 2010-01-06 06:41:41 +00:00
parent dc6fc53763
commit 3bb17ca192

View file

@ -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);
}