diff options
author | Versus Void <versusvoid@gmail.com> | 2017-10-10 13:16:56 +0300 |
---|---|---|
committer | Versus Void <versusvoid@gmail.com> | 2017-10-10 13:16:56 +0300 |
commit | d3af2c09c2ebfa16cb012b0333b06b4208923197 (patch) | |
tree | e4f157a4900c99ab9863a95cd01de69de3159c35 | |
parent | c39bfe7f84818be9d9901e30ba26db9e8f19c47e (diff) |
Destroy callbacks before callback list reinitialization
-rw-r--r-- | types/wlr_surface.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/types/wlr_surface.c b/types/wlr_surface.c index ca7a9af5..31bb9c57 100644 --- a/types/wlr_surface.c +++ b/types/wlr_surface.c @@ -158,6 +158,10 @@ static void wlr_surface_update_size(struct wlr_surface *surface, struct wlr_surf _height = tmp; } + struct wlr_frame_callback *cb, *tmp; + wl_list_for_each_safe(cb, tmp, &state->frame_callback_list, link) { + wl_resource_destroy(cb->resource); + } wl_list_init(&state->frame_callback_list); state->width = _width; |