devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=788507961a55670c959ed5aa57e84c818bc0f4a1

commit 788507961a55670c959ed5aa57e84c818bc0f4a1
Author: Yeongjong Lee <[email protected]>
Date:   Thu Nov 15 09:11:38 2018 -0500

    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
---
 src/lib/ecore_wl2/ecore_wl2_dnd.c | 2 ++
 1 file changed, 2 insertions(+)

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)
    Ecore_Wl2_Input *input = data;
 
    if (input->data.drag.source == source) input->data.drag.source = NULL;
+   if (input->data.selection.source == source) input->data.selection.source = 
NULL;
    input->data.drag.action = WL_DATA_DEVICE_MANAGER_DND_ACTION_NONE;
    wl_data_source_destroy(source);
    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)
    Ecore_Wl2_Input *input = data;
 
    if (input->data.drag.source == source) input->data.drag.source = NULL;
+   if (input->data.selection.source == source) input->data.selection.source = 
NULL;
    wl_data_source_destroy(source);
    data_source_event_emit(input, ECORE_WL2_EVENT_DATA_SOURCE_END, 0);
 }

-- 


Reply via email to