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>
This commit is contained in:
Chris Michael 2016-11-30 12:12:38 -05:00
parent 1f3f66b662
commit 80df180157
1 changed files with 5 additions and 2 deletions

View File

@ -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");
}
}