summaryrefslogtreecommitdiff
path: root/src/lib/ecore_wl2
diff options
context:
space:
mode:
authorYeongjong Lee <yj34.lee@samsung.com>2018-11-15 09:11:38 -0500
committerChris Michael <cp.michael@samsung.com>2018-11-15 09:11:38 -0500
commit788507961a55670c959ed5aa57e84c818bc0f4a1 (patch)
treedd1f666b9976b3e281275f8caa9c25261e556f8e /src/lib/ecore_wl2
parent1c530d210d3d70e6b45422c03d17a72c5e8e0f7b (diff)
ecore_wl2_dnd: initialize source to NULL when it destroy
Summary: This prevent double destruction of source. if _ecore_wl2_input_del is called with destroyed source, it can make unexpected troubles. Reviewers: Hermet, id213sin, devilhorns Reviewed By: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7265
Diffstat (limited to 'src/lib/ecore_wl2')
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_dnd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_dnd.c b/src/lib/ecore_wl2/ecore_wl2_dnd.c
index b39ecc2b84..fccbed468b 100644
--- a/src/lib/ecore_wl2/ecore_wl2_dnd.c
+++ b/src/lib/ecore_wl2/ecore_wl2_dnd.c
@@ -187,6 +187,7 @@ data_source_cancelled(void *data, struct wl_data_source *source)
187 Ecore_Wl2_Input *input = data; 187 Ecore_Wl2_Input *input = data;
188 188
189 if (input->data.drag.source == source) input->data.drag.source = NULL; 189 if (input->data.drag.source == source) input->data.drag.source = NULL;
190 if (input->data.selection.source == source) input->data.selection.source = NULL;
190 input->data.drag.action = WL_DATA_DEVICE_MANAGER_DND_ACTION_NONE; 191 input->data.drag.action = WL_DATA_DEVICE_MANAGER_DND_ACTION_NONE;
191 wl_data_source_destroy(source); 192 wl_data_source_destroy(source);
192 data_source_event_emit(input, ECORE_WL2_EVENT_DATA_SOURCE_END, 1); 193 data_source_event_emit(input, ECORE_WL2_EVENT_DATA_SOURCE_END, 1);
@@ -205,6 +206,7 @@ data_source_dnd_finished(void *data, struct wl_data_source *source)
205 Ecore_Wl2_Input *input = data; 206 Ecore_Wl2_Input *input = data;
206 207
207 if (input->data.drag.source == source) input->data.drag.source = NULL; 208 if (input->data.drag.source == source) input->data.drag.source = NULL;
209 if (input->data.selection.source == source) input->data.selection.source = NULL;
208 wl_data_source_destroy(source); 210 wl_data_source_destroy(source);
209 data_source_event_emit(input, ECORE_WL2_EVENT_DATA_SOURCE_END, 0); 211 data_source_event_emit(input, ECORE_WL2_EVENT_DATA_SOURCE_END, 0);
210} 212}