mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-07 07:00:48 +00:00
Fixed wayland cursor use-after-free at shutdown
This commit is contained in:
parent
041894a523
commit
b9d018f2a2
1 changed files with 7 additions and 0 deletions
|
|
@ -598,6 +598,13 @@ static SDL_Cursor *Wayland_CreateDefaultCursor(void)
|
|||
|
||||
static void Wayland_FreeCursorData(SDL_CursorData *d)
|
||||
{
|
||||
SDL_VideoDevice *vd = SDL_GetVideoDevice();
|
||||
struct SDL_WaylandInput *input = vd->internal->input;
|
||||
|
||||
if (input->current_cursor == d) {
|
||||
input->current_cursor = NULL;
|
||||
}
|
||||
|
||||
// Buffers for system cursors must not be destroyed.
|
||||
if (d->is_system_cursor) {
|
||||
if (d->cursor_data.system.frame_callback) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue