aboutsummaryrefslogtreecommitdiffstats
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
parentecore audio - add comment that this is an intended leak... (diff)
downloadefl-67be5b427a13d88a679e265ba7f33fb2c0f64cdb.tar.gz
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,
{
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);
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
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;