Browse Source

Fixed haptic refcount bug (thanks David Ludwig!)

Sam Lantinga 11 years ago
parent
commit
9b1b74e6c0
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/haptic/SDL_haptic.c

+ 1 - 1
src/haptic/SDL_haptic.c

@@ -343,7 +343,7 @@ SDL_HapticClose(SDL_Haptic * haptic)
     }
     }
 
 
     /* Check if it's still in use */
     /* Check if it's still in use */
-    if (--haptic->ref_count < 0) {
+    if (--haptic->ref_count > 0) {
         return;
         return;
     }
     }