Commit 53260b31b529e51d2b9f5a2b4146d9b15b1449dd

Sam Lantinga 2018-10-08T12:49:23

There are legitimate reasons to skip full cleanup at shutdown, don't assert in that case.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff --git a/src/haptic/SDL_haptic.c b/src/haptic/SDL_haptic.c
index 48bb818..f23ba18 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;
 }
 
 /*