ecore-wl2: Ensure we remove the proper pointer frame callback

During the pointer frame callback, if we had a 'callback' but did not
have an input->cursor.frame_cb then we would have ended up deleting
the callback here anyway. Let's add a comparison of the callback to
the pointer frame callback to ensure we are removing the proper
callback.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2016-10-26 10:54:58 -04:00
parent eeb4ce879d
commit 59bf99eda2
1 changed files with 2 additions and 1 deletions

View File

@ -666,7 +666,8 @@ _pointer_cb_frame(void *data, struct wl_callback *callback, unsigned int timesta
if (callback)
{
if (callback != input->cursor.frame_cb) return;
if ((input->cursor.frame_cb) &&
(callback != input->cursor.frame_cb)) return;
wl_callback_destroy(callback);
input->cursor.frame_cb = NULL;
}