summaryrefslogtreecommitdiff
path: root/src/lib/efl_wl
diff options
context:
space:
mode:
authorYeongJong Lee <yj34.lee@samsung.com>2018-04-06 09:38:10 -0500
committerDerek Foreman <derekf@osg.samsung.com>2018-04-06 09:38:23 -0500
commit67be5b427a13d88a679e265ba7f33fb2c0f64cdb (patch)
tree9decdd5a4c458a5c160e032278ac522196301a3f /src/lib/efl_wl
parentb63d64bda2bc736245c90cd794f3d47ac858266d (diff)
efl_wl: Add NULL check
Reviewers: zmike, ManMower, Jaehyun_Cho, woohyun Reviewed By: ManMower Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D5862
Diffstat (limited to 'src/lib/efl_wl')
-rw-r--r--src/lib/efl_wl/copiedfromweston.x7
-rw-r--r--src/lib/efl_wl/efl_wl.c8
2 files changed, 13 insertions, 2 deletions
diff --git a/src/lib/efl_wl/copiedfromweston.x b/src/lib/efl_wl/copiedfromweston.x
index 17a31cbe55..d5c35eee75 100644
--- a/src/lib/efl_wl/copiedfromweston.x
+++ b/src/lib/efl_wl/copiedfromweston.x
@@ -318,6 +318,7 @@ drag_grab_button(Comp_Seat *s,
318{ 318{
319 Comp_Data_Device_Source *data_source = s->drag.source; 319 Comp_Data_Device_Source *data_source = s->drag.source;
320 enum wl_pointer_button_state state = state_w; 320 enum wl_pointer_button_state state = state_w;
321 struct wl_resource *res;
321 322
322 if (data_source && 323 if (data_source &&
323 s->drag.id == button && 324 s->drag.id == button &&
@@ -328,8 +329,12 @@ drag_grab_button(Comp_Seat *s,
328 data_source->current_dnd_action) 329 data_source->current_dnd_action)
329 { 330 {
330 if (s->drag.enter) 331 if (s->drag.enter)
331 wl_data_device_send_drop(data_device_find(s, s->drag.enter->res)); 332 {
333 res = data_device_find(s, s->drag.enter->res);
334 if (!res) return;
332 335
336 wl_data_device_send_drop(res);
337 }
333 if (wl_resource_get_version(data_source->res) >= 338 if (wl_resource_get_version(data_source->res) >=
334 WL_DATA_SOURCE_DND_DROP_PERFORMED_SINCE_VERSION) 339 WL_DATA_SOURCE_DND_DROP_PERFORMED_SINCE_VERSION)
335 wl_data_source_send_dnd_drop_performed(data_source->res); 340 wl_data_source_send_dnd_drop_performed(data_source->res);
diff --git a/src/lib/efl_wl/efl_wl.c b/src/lib/efl_wl/efl_wl.c
index 0682f0e489..a6c51b07b9 100644
--- a/src/lib/efl_wl/efl_wl.c
+++ b/src/lib/efl_wl/efl_wl.c
@@ -634,6 +634,7 @@ static void
634comp_surface_proxy_win_del(Ecore_Evas *ee) 634comp_surface_proxy_win_del(Ecore_Evas *ee)
635{ 635{
636 Comp_Seat *s = ecore_evas_data_get(ee, "comp_seat"); 636 Comp_Seat *s = ecore_evas_data_get(ee, "comp_seat");
637 if (!s) return;
637 638
638 s->drag.proxy_win = NULL; 639 s->drag.proxy_win = NULL;
639 //fprintf(stderr, "PROXY WIN DEL\n"); 640 //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
2314 if ((!l) || (s->drag.tch && ((uint32_t)ev->device == s->drag.id))) 2315 if ((!l) || (s->drag.tch && ((uint32_t)ev->device == s->drag.id)))
2315 { 2316 {
2316 if (s->drag.tch) 2317 if (s->drag.tch)
2317 wl_data_device_send_drop(data_device_find(s, cs->res)); 2318 {
2319 res = data_device_find(s, cs->res);
2320 if (!res) return;
2321
2322 wl_data_device_send_drop(res);
2323 }
2318 comp_surface_input_event(&s->tch.events, ev->device, 0, ev->timestamp, 1); 2324 comp_surface_input_event(&s->tch.events, ev->device, 0, ev->timestamp, 1);
2319 s->event_propagate = 1; 2325 s->event_propagate = 1;
2320 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; 2326 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;