From f41ebcb46105a77654a79f6e7e9c9ea94e3da2bb Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sat, 13 Sep 2003 02:20:32 +0000 Subject: [PATCH] SDL_JoystickInit: If malloc() fails, pretend no joysticks were detected. --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40717 --- src/joystick/SDL_joystick.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/joystick/SDL_joystick.c b/src/joystick/SDL_joystick.c index e87e42fdc..756f11b2c 100644 --- a/src/joystick/SDL_joystick.c +++ b/src/joystick/SDL_joystick.c @@ -63,8 +63,8 @@ int SDL_JoystickInit(void) SDL_numjoysticks = 0; } else { memset(SDL_joysticks, 0, arraylen); + SDL_numjoysticks = status; } - SDL_numjoysticks = status; status = 0; } default_joystick = NULL;