mirror of
https://github.com/joel16/SDL2.git
synced 2024-12-13 14:07:38 +00:00
Merged r4121:4122 from branches/SDL-1.2: win32 joystick double-free fix.
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404361
This commit is contained in:
parent
4ab9267d2d
commit
3617a04d58
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user