changeset 3610:3c1b39d0d1a6

Merged r4121:4122 from branches/SDL-1.2: win32 joystick double-free fix.
author Ryan C. Gordon <icculus@icculus.org>
date Wed, 06 Jan 2010 07:26:49 +0000
parents 72a1c4dda07c
children 57823d017f02
files src/joystick/win32/SDL_mmjoystick.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/joystick/win32/SDL_mmjoystick.c	Wed Jan 06 06:44:23 2010 +0000
+++ b/src/joystick/win32/SDL_mmjoystick.c	Wed Jan 06 07:26:49 2010 +0000
@@ -362,6 +362,7 @@
     if (joystick->hwdata != NULL) {
         /* free system specific hardware data */
         SDL_free(joystick->hwdata);
+        joystick->hwdata = NULL;
     }
 }
 
@@ -373,6 +374,7 @@
     for (i = 0; i < MAX_JOYSTICKS; i++) {
         if (SYS_JoystickName[i] != NULL) {
             SDL_free(SYS_JoystickName[i]);
+            SYS_JoystickName[i] = NULL;
         }
     }
 }