forked from enlightenment/efl
efl_wl: Add NULL check
Reviewers: zmike, ManMower, Jaehyun_Cho, woohyun Reviewed By: ManMower Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D5862
This commit is contained in:
parent
b63d64bda2
commit
67be5b427a
|
@ -318,6 +318,7 @@ drag_grab_button(Comp_Seat *s,
|
|||
{
|
||||
Comp_Data_Device_Source *data_source = s->drag.source;
|
||||
enum wl_pointer_button_state state = state_w;
|
||||
struct wl_resource *res;
|
||||
|
||||
if (data_source &&
|
||||
s->drag.id == button &&
|
||||
|
@ -328,8 +329,12 @@ drag_grab_button(Comp_Seat *s,
|
|||
data_source->current_dnd_action)
|
||||
{
|
||||
if (s->drag.enter)
|
||||
wl_data_device_send_drop(data_device_find(s, s->drag.enter->res));
|
||||
{
|
||||
res = data_device_find(s, s->drag.enter->res);
|
||||
if (!res) return;
|
||||
|
||||
wl_data_device_send_drop(res);
|
||||
}
|
||||
if (wl_resource_get_version(data_source->res) >=
|
||||
WL_DATA_SOURCE_DND_DROP_PERFORMED_SINCE_VERSION)
|
||||
wl_data_source_send_dnd_drop_performed(data_source->res);
|
||||
|
|
|
@ -634,6 +634,7 @@ static void
|
|||
comp_surface_proxy_win_del(Ecore_Evas *ee)
|
||||
{
|
||||
Comp_Seat *s = ecore_evas_data_get(ee, "comp_seat");
|
||||
if (!s) return;
|
||||
|
||||
s->drag.proxy_win = NULL;
|
||||
//fprintf(stderr, "PROXY WIN DEL\n");
|
||||
|
@ -2314,7 +2315,12 @@ comp_surface_multi_up(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNU
|
|||
if ((!l) || (s->drag.tch && ((uint32_t)ev->device == s->drag.id)))
|
||||
{
|
||||
if (s->drag.tch)
|
||||
wl_data_device_send_drop(data_device_find(s, cs->res));
|
||||
{
|
||||
res = data_device_find(s, cs->res);
|
||||
if (!res) return;
|
||||
|
||||
wl_data_device_send_drop(res);
|
||||
}
|
||||
comp_surface_input_event(&s->tch.events, ev->device, 0, ev->timestamp, 1);
|
||||
s->event_propagate = 1;
|
||||
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
|
||||
|
|
Loading…
Reference in New Issue