mirror of
https://github.com/yawut/SDL.git
synced 2026-09-08 00:56:24 -05:00
Merged r4121:4122 from branches/SDL-1.2: win32 joystick double-free fix.
This commit is contained in:
@@ -362,6 +362,7 @@ SDL_SYS_JoystickClose(SDL_Joystick * joystick)
|
||||
if (joystick->hwdata != NULL) {
|
||||
/* free system specific hardware data */
|
||||
SDL_free(joystick->hwdata);
|
||||
joystick->hwdata = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -373,6 +374,7 @@ SDL_SYS_JoystickQuit(void)
|
||||
for (i = 0; i < MAX_JOYSTICKS; i++) {
|
||||
if (SYS_JoystickName[i] != NULL) {
|
||||
SDL_free(SYS_JoystickName[i]);
|
||||
SYS_JoystickName[i] = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user