summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2016-11-30 12:12:38 -0500
committerChris Michael <cp.michael@samsung.com>2016-11-30 12:12:38 -0500
commit80df180157bc38547c3f696a16f835d4976230d5 (patch)
tree269c2bffb479f7efc45b6e1c7e76bd055377173c
parent1f3f66b662a88ca38458a64200d9586830525389 (diff)
downloadefl-80df180157bc38547c3f696a16f835d4976230d5.tar.gz
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 <cp.michael@samsung.com>
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_input.c7
1 files 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 d272dc42f9..c6a5ae8b3d 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");
}
}