changeset 4395:3c35b8d3b9fc SDL-1.2

Call SDL_OutOfMemory() if SDL_malloc() fails.
author Ryan C. Gordon <icculus@icculus.org>
date Wed, 06 Jan 2010 06:41:41 +0000
parents 42012a6afb5b
children f5d3f7fa071d
files src/joystick/SDL_joystick.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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);
 	}