Skip to content

Commit

Permalink
safer this way, just in case..
Browse files Browse the repository at this point in the history
  • Loading branch information
sezero committed Sep 25, 2018
1 parent da89b81 commit 870c44b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/joystick/hidapi/SDL_hidapijoystick.c
Expand Up @@ -376,13 +376,13 @@ HIDAPI_ShutdownDiscovery()
#endif

#if defined(SDL_USE_LIBUDEV)
if (SDL_HIDAPI_discovery.m_pUdevMonitor) {
usyms->udev_monitor_unref(SDL_HIDAPI_discovery.m_pUdevMonitor);
}
if (SDL_HIDAPI_discovery.m_pUdev) {
usyms->udev_unref(SDL_HIDAPI_discovery.m_pUdev);
}
if (usyms) {
if (SDL_HIDAPI_discovery.m_pUdevMonitor) {
usyms->udev_monitor_unref(SDL_HIDAPI_discovery.m_pUdevMonitor);
}
if (SDL_HIDAPI_discovery.m_pUdev) {
usyms->udev_unref(SDL_HIDAPI_discovery.m_pUdev);
}
SDL_UDEV_ReleaseUdevSyms();
usyms = NULL;
}
Expand Down

0 comments on commit 870c44b

Please sign in to comment.