raster pushed a commit to branch master.

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

commit c9356a3f8c7bbf674cb25f721d2082586b56077a
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Tue Aug 6 19:11:24 2019 +0100

    wl drag start - check source ptr consistently
    
    fix CID 1403926
---
 src/bin/e_comp_wl_data.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/bin/e_comp_wl_data.c b/src/bin/e_comp_wl_data.c
index bb430a81e..370d92a88 100644
--- a/src/bin/e_comp_wl_data.c
+++ b/src/bin/e_comp_wl_data.c
@@ -488,10 +488,11 @@ _e_comp_wl_data_device_selection_set(void *data 
EINA_UNUSED, E_Comp_Wl_Data_Sour
    sel_source = (E_Comp_Wl_Data_Source *)e_comp_wl->selection.data_source;
    if (sel_source && (e_comp_wl->selection.serial - serial < UINT32_MAX / 2))
      {
-        if (!serial)
+        if ((source) && (!serial))
           {
              /* drm canvas will always have serial 0 */
              pid_t pid;
+
              
wl_client_get_credentials(wl_resource_get_client(source->resource), &pid, NULL, 
NULL);
              if (pid != getpid()) return;
           }
@@ -509,7 +510,8 @@ _e_comp_wl_data_device_selection_set(void *data 
EINA_UNUSED, E_Comp_Wl_Data_Sour
 
    e_comp_wl->selection.data_source = sel_source = source;
    e_comp_wl->clipboard.xwl_owner = 0;
-   source->serial = e_comp_wl->selection.serial = serial;
+   e_comp_wl->selection.serial = serial;
+   if (source) source->serial = serial;
 
    if (e_comp_wl->kbd.enabled)
      focus = e_comp_wl->kbd.focus;

-- 


Reply via email to