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

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40717
This commit is contained in:
Ryan C. Gordon 2003-09-13 02:20:32 +00:00
parent 94c8f99de6
commit f41ebcb461

View file

@ -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;