touch-input: Don't dereference NULL pointer during full screen fade
If a full screen program is fading out and a touch start happens, it will result in a NULL pointer dereference when weston_touch_set_focus tries to derefernce view->surface->resource. Instead, this patch sets the focus to NULL, which should be the same as if the program was destroyed during the touch anyway. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=78706 Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
This commit is contained in:
committed by
Pekka Paalanen
parent
bfb4ade1a0
commit
362656bfa3
@@ -4444,10 +4444,14 @@ fullscreen_binding(struct weston_seat *seat, uint32_t time, uint32_t button, voi
|
||||
static void
|
||||
touch_move_binding(struct weston_seat *seat, uint32_t time, void *data)
|
||||
{
|
||||
struct weston_surface *focus = seat->touch->focus->surface;
|
||||
struct weston_surface *focus;
|
||||
struct weston_surface *surface;
|
||||
struct shell_surface *shsurf;
|
||||
|
||||
if (seat->touch->focus == NULL)
|
||||
return;
|
||||
|
||||
focus = seat->touch->focus->surface;
|
||||
surface = weston_surface_get_main_surface(focus);
|
||||
if (surface == NULL)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user