Commit 3617a04d authored by Ryan C. Gordon's avatar Ryan C. Gordon

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
parent 4ab9267d
...@@ -362,6 +362,7 @@ SDL_SYS_JoystickClose(SDL_Joystick * joystick) ...@@ -362,6 +362,7 @@ SDL_SYS_JoystickClose(SDL_Joystick * joystick)
if (joystick->hwdata != NULL) { if (joystick->hwdata != NULL) {
/* free system specific hardware data */ /* free system specific hardware data */
SDL_free(joystick->hwdata); SDL_free(joystick->hwdata);
joystick->hwdata = NULL;
} }
} }
...@@ -373,6 +374,7 @@ SDL_SYS_JoystickQuit(void) ...@@ -373,6 +374,7 @@ SDL_SYS_JoystickQuit(void)
for (i = 0; i < MAX_JOYSTICKS; i++) { for (i = 0; i < MAX_JOYSTICKS; i++) {
if (SYS_JoystickName[i] != NULL) { if (SYS_JoystickName[i] != NULL) {
SDL_free(SYS_JoystickName[i]); SDL_free(SYS_JoystickName[i]);
SYS_JoystickName[i] = 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