devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=80df180157bc38547c3f696a16f835d4976230d5

commit 80df180157bc38547c3f696a16f835d4976230d5
Author: Chris Michael <[email protected]>
Date:   Wed Nov 30 12:12:38 2016 -0500

    ecore-wl2: Add warning if a wl_surface_frame callback failes to get created
    
    There could be situations where wl_surface_frame fails to create a
    callback. In those cases, we should not be trying to add a wl_callback
    listener for a non-existant callback.
    
    Signed-off-by: Chris Michael <[email protected]>
---
 src/lib/ecore_wl2/ecore_wl2_input.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c 
b/src/lib/ecore_wl2/ecore_wl2_input.c
index d272dc4..c6a5ae8 100644
--- a/src/lib/ecore_wl2/ecore_wl2_input.c
+++ b/src/lib/ecore_wl2/ecore_wl2_input.c
@@ -756,8 +756,11 @@ _pointer_cb_frame(void *data, struct wl_callback 
*callback, unsigned int timesta
    if ((!input->cursor.frame_cb) && (input->cursor.surface))
      {
         input->cursor.frame_cb = wl_surface_frame(input->cursor.surface);
-        wl_callback_add_listener(input->cursor.frame_cb,
-                                 &_pointer_surface_listener, input);
+        if (input->cursor.frame_cb)
+          wl_callback_add_listener(input->cursor.frame_cb,
+                                   &_pointer_surface_listener, input);
+        else
+          WRN("Failed to create surface frame callback for cursor surface");
      }
 }
 

-- 


Reply via email to