aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-08-10 22:23:46 -0400
committerDrew DeVault <sir@cmpwn.com>2017-08-10 22:24:24 -0400
commit33753816106a2da390973491260137dd5ddb24cd (patch)
tree5a73f29be7a7d54828932f81ea567e5b429a8e63 /examples
parent6569c2b62614384b268eb20feb7818f3c0cf606c (diff)
Fix segfault during xdg-shell cleanup
Diffstat (limited to 'examples')
-rw-r--r--examples/compositor/xdg_shell.c4
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);
}