Commit f41ebcb4 authored by Ryan C. Gordon's avatar Ryan C. Gordon

SDL_JoystickInit: If malloc() fails, pretend no joysticks were detected.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40717
parent 94c8f99d
...@@ -63,8 +63,8 @@ int SDL_JoystickInit(void) ...@@ -63,8 +63,8 @@ int SDL_JoystickInit(void)
SDL_numjoysticks = 0; SDL_numjoysticks = 0;
} else { } else {
memset(SDL_joysticks, 0, arraylen); memset(SDL_joysticks, 0, arraylen);
}
SDL_numjoysticks = status; SDL_numjoysticks = status;
}
status = 0; status = 0;
} }
default_joystick = NULL; default_joystick = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment