From 53260b31b529e51d2b9f5a2b4146d9b15b1449dd Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 8 Oct 2018 12:49:23 -0700 Subject: [PATCH] There are legitimate reasons to skip full cleanup at shutdown, don't assert in that case. --- src/haptic/SDL_haptic.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/haptic/SDL_haptic.c b/src/haptic/SDL_haptic.c index 48bb818d663d6..f23ba18df2aa8 100644 --- a/src/haptic/SDL_haptic.c +++ b/src/haptic/SDL_haptic.c @@ -389,9 +389,11 @@ SDL_HapticClose(SDL_Haptic * haptic) void SDL_HapticQuit(void) { + while (SDL_haptics) { + SDL_HapticClose(SDL_haptics); + } + SDL_SYS_HapticQuit(); - SDL_assert(SDL_haptics == NULL); - SDL_haptics = NULL; } /*