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:
Ryan C. Gordon 2010-01-06 07:26:49 +00:00
parent 4ab9267d2d
commit 3617a04d58

View File

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