mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-26 06:35:58 +01:00
use safe for_each when freeing cursor devices
This commit is contained in:
parent
e3d47376dc
commit
9978349903
1 changed files with 2 additions and 2 deletions
|
@ -51,8 +51,8 @@ struct wlr_cursor *wlr_cursor_init() {
|
|||
}
|
||||
|
||||
void wlr_cursor_destroy(struct wlr_cursor *cur) {
|
||||
struct wlr_cursor_device *device;
|
||||
wl_list_for_each(device, &cur->state->devices, link) {
|
||||
struct wlr_cursor_device *device, *tmp = NULL;
|
||||
wl_list_for_each_safe(device, tmp, &cur->state->devices, link) {
|
||||
wl_list_remove(&device->link);
|
||||
free(device);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue