From 9b1b74e6c0d761dbe9633576910cf53943b68647 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 4 Jul 2014 17:20:22 -0700 Subject: [PATCH] Fixed haptic refcount bug (thanks David Ludwig!) --- src/haptic/SDL_haptic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/haptic/SDL_haptic.c b/src/haptic/SDL_haptic.c index fbfe14f3bbbd4..596b26e6e57d9 100644 --- a/src/haptic/SDL_haptic.c +++ b/src/haptic/SDL_haptic.c @@ -343,7 +343,7 @@ SDL_HapticClose(SDL_Haptic * haptic) } /* Check if it's still in use */ - if (--haptic->ref_count < 0) { + if (--haptic->ref_count > 0) { return; }