src/haptic/darwin/SDL_syshaptic.c
branchgsoc2008_force_feedback
changeset 2561 3696b9ce8a37
parent 2559 42b682e85546
child 2562 c284ce0cd8e0
--- a/src/haptic/darwin/SDL_syshaptic.c	Thu Jul 31 09:02:43 2008 +0000
+++ b/src/haptic/darwin/SDL_syshaptic.c	Thu Jul 31 09:45:27 2008 +0000
@@ -470,19 +470,11 @@
 void
 SDL_SYS_HapticClose(SDL_Haptic * haptic)
 {
-   int i;
-
    if (haptic->hwdata) {
 
-      /* Free the effects. */
-      for (i=0; i<haptic->neffects; i++) {        
-         if (haptic->effects[i].hweffect != NULL) {
-            SDL_SYS_HapticFreeFFEFFECT(&haptic->effects[i].hweffect->effect,
-                                       haptic->effects[i].effect.type);
-            SDL_free(haptic->effects[i].hweffect);
-         } 
-      }    
+      /* Free Effects. */
       SDL_free(haptic->effects);
+      haptic->effects = NULL;
       haptic->neffects = 0;
 
       /* Clean up */