safer this way, just in case..
authorOzkan Sezer <sezeroz@gmail.com>
Tue, 25 Sep 2018 09:20:56 +0300
changeset 122060be7fc59830a
parent 12205 483789136c52
child 12220 f10c21b0c0ef
safer this way, just in case..
src/joystick/hidapi/SDL_hidapijoystick.c
     1.1 --- a/src/joystick/hidapi/SDL_hidapijoystick.c	Mon Sep 24 20:31:24 2018 -0700
     1.2 +++ b/src/joystick/hidapi/SDL_hidapijoystick.c	Tue Sep 25 09:20:56 2018 +0300
     1.3 @@ -376,13 +376,13 @@
     1.4  #endif
     1.5  
     1.6  #if defined(SDL_USE_LIBUDEV)
     1.7 -    if (SDL_HIDAPI_discovery.m_pUdevMonitor) {
     1.8 -        usyms->udev_monitor_unref(SDL_HIDAPI_discovery.m_pUdevMonitor);
     1.9 -    }
    1.10 -    if (SDL_HIDAPI_discovery.m_pUdev) {
    1.11 -        usyms->udev_unref(SDL_HIDAPI_discovery.m_pUdev);
    1.12 -    }
    1.13      if (usyms) {
    1.14 +        if (SDL_HIDAPI_discovery.m_pUdevMonitor) {
    1.15 +            usyms->udev_monitor_unref(SDL_HIDAPI_discovery.m_pUdevMonitor);
    1.16 +        }
    1.17 +        if (SDL_HIDAPI_discovery.m_pUdev) {
    1.18 +            usyms->udev_unref(SDL_HIDAPI_discovery.m_pUdev);
    1.19 +        }
    1.20          SDL_UDEV_ReleaseUdevSyms();
    1.21          usyms = NULL;
    1.22      }