diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-08-22 13:47:41 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-22 13:47:41 -0500 |
commit | a138657598efafbd3cfd7c77cb32ba294d0b841c (patch) | |
tree | e560f41ddf02d8d45f0810182420870c743b5b4f | |
parent | 9f6c8e6288470aeae0076d4849a17a3aca44b000 (diff) | |
parent | ee3c5c7fef6dc223744c8e90126f3382f02b6942 (diff) |
Merge pull request #121 from martinetd/wlr_seat_destroy
wlr_seat: fix destroy with multiple handles
-rw-r--r-- | types/wlr_seat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/types/wlr_seat.c b/types/wlr_seat.c index f01f7974..2c1abd94 100644 --- a/types/wlr_seat.c +++ b/types/wlr_seat.c @@ -180,8 +180,8 @@ void wlr_seat_destroy(struct wlr_seat *wlr_seat) { return; } - struct wlr_seat_handle *handle; - wl_list_for_each(handle, &wlr_seat->handles, link) { + struct wlr_seat_handle *handle, *tmp; + wl_list_for_each_safe(handle, tmp, &wlr_seat->handles, link) { wl_resource_destroy(handle->wl_resource); // will destroy other resources as well } |