Преглед на файлове

Fix refcounting in SDL_hid_exit

Mathieu Eyraud преди 3 години
родител
ревизия
5fc7a90a8b
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      src/hidapi/SDL_hidapi.c

+ 1 - 1
src/hidapi/SDL_hidapi.c

@@ -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;