mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-25 07:35:38 +00:00
Fixed bug 2562 - SDL_hapticlist/_tail not set correctly
Zachary L SDL_hapticlist and SDL_hapticlist_tail are not set correctly when quitting the subsystem. This matters because they are represented as global variables. In the case you quit and reinitialize the subsystems, problems with dangling pointers arise. For instance, SDL_hapticlist_tail will not be null on second initialization and because of the check on line 298, it will fail to set SDL_hapticlist appropriately. This can cause a few things to go wrong, like feeding SDL_strcmp a null fname which can cause a segfault.
This commit is contained in:
parent
e8d84fbfaa
commit
f8b75b1a14
|
@ -624,6 +624,8 @@ SDL_SYS_HapticQuit(void)
|
||||||
#endif /* SDL_USE_LIBUDEV */
|
#endif /* SDL_USE_LIBUDEV */
|
||||||
|
|
||||||
numhaptics = 0;
|
numhaptics = 0;
|
||||||
|
SDL_hapticlist = NULL;
|
||||||
|
SDL_hapticlist_tail = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue