diff options
author | Florian Hänel <florian.haenel@lge.com> | 2017-05-04 14:15:27 +0200 |
---|---|---|
committer | Florian Hänel <florian.haenel@lge.com> | 2017-05-08 13:24:10 +0200 |
commit | 3f919e7c62417d4c4393ccb7e37fd0a9493a3935 (patch) | |
tree | 55b3dcf2e4c1b08ea7fd991d5f7cf1d5017188a5 /weston-ivi-shell | |
parent | 0dac041d24de06762365de9d84f4c228e576ed4c (diff) | |
download | wayland-ivi-extension-3f919e7c62417d4c4393ccb7e37fd0a9493a3935.tar.gz |
Fix crash when surface already focused
when the surface has touch-focus on the local screen
and you touch on the remote screen for some reason it can't
find the resource for the client. it will run off the endi
of the list and target_resource will be an invalid pointer.
Diffstat (limited to 'weston-ivi-shell')
-rw-r--r-- | weston-ivi-shell/src/ivi-share.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/weston-ivi-shell/src/ivi-share.c b/weston-ivi-shell/src/ivi-share.c index ffb9259..7537749 100644 --- a/weston-ivi-shell/src/ivi-share.c +++ b/weston-ivi-shell/src/ivi-share.c @@ -150,16 +150,17 @@ share_surface_redirect_touch_down(struct wl_client *client, uint32_t new_serial = wl_display_next_serial(client_link->parent->shell_ext->wc->wl_display); wl_touch_send_down(target_resource, new_serial, time, surface_resource, id, x, y); + + redirect_target = malloc(sizeof *redirect_target); + redirect_target->client = client; + redirect_target->resource = resource; + redirect_target->target_resource = target_resource; + redirect_target->id = id; + wl_list_insert(&client_link->parent->shell_ext->list_redirect_target, &redirect_target->link); + break; } } - - redirect_target = malloc(sizeof *redirect_target); - redirect_target->client = client; - redirect_target->resource = resource; - redirect_target->target_resource = target_resource; - redirect_target->id = id; - wl_list_insert(&client_link->parent->shell_ext->list_redirect_target, &redirect_target->link); } static void |