From: Rafael Antognolli Date: Tue, 13 Aug 2013 18:49:53 +0000 (-0300) Subject: ecore_evas/wayland_egl: Add safety check on surface. X-Git-Tag: submit/tizen/20130814.144029~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ae8a9c9170a9cc3dfa9a7983e09bd0693d68671f;p=platform%2Fupstream%2Fecore.git ecore_evas/wayland_egl: Add safety check on surface. Must check if there's a surface before adding a new frame callback. Should fix https://phab.enlightenment.org/T275. --- diff --git a/src/lib/ecore_evas/ecore_evas_wayland_egl.c b/src/lib/ecore_evas/ecore_evas_wayland_egl.c index 01224ac..cce9f46 100644 --- a/src/lib/ecore_evas/ecore_evas_wayland_egl.c +++ b/src/lib/ecore_evas/ecore_evas_wayland_egl.c @@ -847,11 +847,13 @@ _ecore_evas_wl_frame_complete(void *data, struct wl_callback *callback, uint32_t win->frame_pending = EINA_FALSE; wl_callback_destroy(callback); - win->frame_callback = - wl_surface_frame(win->surface); - - wl_callback_add_listener(win->frame_callback, - &frame_listener, ee); + if (win->surface) + { + win->frame_callback = + wl_surface_frame(win->surface); + wl_callback_add_listener(win->frame_callback, + &frame_listener, ee); + } } static int