We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2934

Summary: Wayland crash in wl_proxy_get_user_data
Product: SDL Reporter: x414e54
Component: eventsAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: icculus
Version: HG 2.1Keywords: target-2.0.4
Hardware: x86_64   
OS: Linux   
Attachments: Wayland Null Surface Fix

Description x414e54 2015-04-08 07:05:32 UTC
It looks as though there is an issue in keyboard_handle_enter in SDL_waylandevents.c causing a SIGSEGV in wl_surface_get_user_data.

This seems to be because the surface is null due having been destroyed and the application still receives an event. 

It should check for !surface and return similar to how it does in pointer_handle_enter above in the same file.
Comment 1 x414e54 2015-04-10 10:55:55 UTC
Created attachment 2115 [details]
Wayland Null Surface Fix

I have created a patch. It simply copies the same null surface handling from pointer_handle_enter to keyboard_handle_enter.
Comment 2 Ryan C. Gordon 2015-05-28 04:19:10 UTC
This patch is now https://hg.libsdl.org/SDL/rev/5c55c6567bdc, thanks!

--ryan.