Skip to content

Commit

Permalink
Call SDL_OutOfMemory() if SDL_malloc() fails.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Jan 6, 2010
1 parent 105097d commit 869392e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/joystick/SDL_joystick.c
Expand Up @@ -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);
}

Expand Down

0 comments on commit 869392e

Please sign in to comment.