swc

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/swc
Log | Files | Refs | README | LICENSE

commit 4fa7c605208a77f6fb03cb2ad4cdbdbe97e95b30
parent 08cfdbde2252a54fcfa98b3476c77c41c74e12ef
Author: Michael Forney <mforney@mforney.org>
Date:   Wed, 11 Sep 2013 16:47:19 -0700

surface: Safely send frame callbacks

Diffstat:
Mlibswc/surface.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libswc/surface.c b/libswc/surface.c @@ -367,12 +367,12 @@ struct swc_surface * swc_surface_new(struct wl_client * client, uint32_t id) void swc_surface_send_frame_callbacks(struct swc_surface * surface, uint32_t time) { - struct wl_resource * callback; + struct wl_resource * resource, * tmp; - wl_list_for_each(callback, &surface->state.frame_callbacks, link) + wl_list_for_each_safe(resource, tmp, &surface->state.frame_callbacks, link) { - wl_callback_send_done(callback, time); - wl_resource_destroy(callback); + wl_callback_send_done(resource, time); + wl_resource_destroy(resource); } wl_list_init(&surface->state.frame_callbacks);