mirror of https://github.com/encounter/SDL.git
joystick: On Linux, don't try to close an invalid inotify file descriptor.
This commit is contained in:
parent
5c9577476f
commit
eaa53a1979
|
@ -1320,8 +1320,10 @@ LINUX_JoystickQuit(void)
|
||||||
SDL_joylist_item *item = NULL;
|
SDL_joylist_item *item = NULL;
|
||||||
SDL_joylist_item *next = NULL;
|
SDL_joylist_item *next = NULL;
|
||||||
|
|
||||||
|
if (inotify_fd >= 0) {
|
||||||
close(inotify_fd);
|
close(inotify_fd);
|
||||||
inotify_fd = -1;
|
inotify_fd = -1;
|
||||||
|
}
|
||||||
|
|
||||||
for (item = SDL_joylist; item; item = next) {
|
for (item = SDL_joylist; item; item = next) {
|
||||||
next = item->next;
|
next = item->next;
|
||||||
|
|
Loading…
Reference in New Issue