discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=0a690c7d174b579d88dc88f0adb3419c11c17841

commit 0a690c7d174b579d88dc88f0adb3419c11c17841
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Mon Aug 10 18:49:04 2015 -0400

    don't crash in wl compositor when data resource is destroyed in multiple 
listeners
---
 src/bin/e_comp_wl_data.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/bin/e_comp_wl_data.c b/src/bin/e_comp_wl_data.c
index 3dc4a1b..a97bd06 100644
--- a/src/bin/e_comp_wl_data.c
+++ b/src/bin/e_comp_wl_data.c
@@ -146,7 +146,7 @@ static void
 _e_comp_wl_data_device_destroy_selection_data_source(struct wl_listener 
*listener EINA_UNUSED, void *data)
 {
    E_Comp_Wl_Data_Source *source;
-   struct wl_resource *data_device_res, *focus = NULL;
+   struct wl_resource *data_device_res = NULL, *focus = NULL;
 
    DBG("Data Device Destroy Selection Source");
    if (!(source = (E_Comp_Wl_Data_Source*)data))
@@ -159,8 +159,9 @@ _e_comp_wl_data_device_destroy_selection_data_source(struct 
wl_listener *listene
 
    if (focus)
      {
-        data_device_res = 
-           
e_comp_wl_data_find_for_client(wl_resource_get_client(source->resource));
+        if (source->resource)
+          data_device_res =
+             
e_comp_wl_data_find_for_client(wl_resource_get_client(source->resource));
 
         if (data_device_res)
           wl_data_device_send_selection(data_device_res, NULL);

-- 


Reply via email to