Skip to content
Permalink
Browse files

Call SDL_OutOfMemory() if SDL_malloc() fails.

  • Loading branch information
icculus committed Jan 6, 2010
1 parent 105097d commit 869392e2f5438d5b2c81ab5c36eda4b918592424
Showing with 1 addition and 0 deletions.
  1. +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);
}

0 comments on commit 869392e

Please sign in to comment.