Call SDL_OutOfMemory() if SDL_malloc() fails. SDL-1.2
authorRyan C. Gordon <icculus@icculus.org>
Wed, 06 Jan 2010 06:41:41 +0000
branchSDL-1.2
changeset 4395 3c35b8d3b9fc
parent 4394 42012a6afb5b
child 4396 f5d3f7fa071d
Call SDL_OutOfMemory() if SDL_malloc() fails.
src/joystick/SDL_joystick.c
--- a/src/joystick/SDL_joystick.c	Thu Dec 17 14:33:00 2009 +0000
+++ b/src/joystick/SDL_joystick.c	Wed Jan 06 06:41:41 2010 +0000
@@ -113,6 +113,7 @@
 	/* Create and initialize the joystick */
 	joystick = (SDL_Joystick *)SDL_malloc((sizeof *joystick));
 	if ( !joystick ) {
+		SDL_OutOfMemory();
 		return(NULL);
 	}