diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-08-10 22:23:46 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2017-08-10 22:24:24 -0400 |
commit | 33753816106a2da390973491260137dd5ddb24cd (patch) | |
tree | 5a73f29be7a7d54828932f81ea567e5b429a8e63 /examples/compositor/xdg_shell.c | |
parent | 6569c2b62614384b268eb20feb7818f3c0cf606c (diff) |
Fix segfault during xdg-shell cleanup
Diffstat (limited to 'examples/compositor/xdg_shell.c')
-rw-r--r-- | examples/compositor/xdg_shell.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/compositor/xdg_shell.c b/examples/compositor/xdg_shell.c index 2efeecfa..98aa47a0 100644 --- a/examples/compositor/xdg_shell.c +++ b/examples/compositor/xdg_shell.c @@ -197,8 +197,8 @@ void xdg_shell_release(struct xdg_shell_state *state) { return; } - struct wl_resource *resource = NULL; - wl_resource_for_each(resource, &state->wl_resources) { + struct wl_resource *resource = NULL, *temp = NULL; + wl_resource_for_each_safe(resource, temp, &state->wl_resources) { struct wl_list *link = wl_resource_get_link(resource); wl_list_remove(link); } |