aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Zeni <simon@bl4ckb0ne.ca>2023-10-01 20:41:22 -0400
committerSimon Zeni <simon@bl4ckb0ne.ca>2023-10-01 20:41:22 -0400
commit9816b59b0e89a4c2a327e4001f3e96248b3dba0a (patch)
treece2005e70212f529deca78090d4ba699633b03fd
parentc2aa7fd965cb7ee8bed24f4122b720aca8f0fc1e (diff)
types/wlr_tearing_control_v1: use safe list iteration on destroy
-rw-r--r--types/wlr_tearing_control_v1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/types/wlr_tearing_control_v1.c b/types/wlr_tearing_control_v1.c
index d11b1280..c7302455 100644
--- a/types/wlr_tearing_control_v1.c
+++ b/types/wlr_tearing_control_v1.c
@@ -149,8 +149,8 @@ static void handle_display_destroy(struct wl_listener *listener, void *data) {
wl_signal_emit_mutable(&manager->events.destroy, NULL);
- struct wlr_tearing_control_v1 *hint;
- wl_list_for_each(hint, &manager->surface_hints, link) {
+ struct wlr_tearing_control_v1 *hint, *tmp;
+ wl_list_for_each_safe(hint, tmp, &manager->surface_hints, link) {
destroy_tearing_hint(hint);
}