Fix refcounting in SDL_hid_exit

This commit is contained in:
Mathieu Eyraud authored and Sam Lantinga committed 2021-11-12 01:25:15 -08:00
1 parent 97c71371f2
commit 5fc7a90a8b
1 file changed
+1 -1
+1 -1
View File
@@ -1084,8 +1084,8 @@ int SDL_hid_exit(void)
if (SDL_hidapi_refcount == 0) {
return 0;
}
--SDL_hidapi_refcount;
if (SDL_hidapi_refcount > 0) {
--SDL_hidapi_refcount;
return 0;
}
SDL_hidapi_refcount = 0;