mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-12-23 02:19:49 +01:00
wlr_output_power_management_v1: Init output_power->link
This makes sure the `wl_list_remove(&output_power->link)` in `output_power_destroy()` does not crash even when the output_power never got added to a list. This can e.g. happen in the `mgmt->output == output` error path of `output_power_manager_get_output_power`.
This commit is contained in:
parent
c99d156f0d
commit
c9859f187f
1 changed files with 1 additions and 0 deletions
|
@ -123,6 +123,7 @@ static void output_power_manager_get_output_power(struct wl_client *client,
|
|||
}
|
||||
output_power->output = output;
|
||||
output_power->manager = manager;
|
||||
wl_list_init(&output_power->link);
|
||||
|
||||
uint32_t version = wl_resource_get_version(manager_resource);
|
||||
output_power->resource = wl_resource_create(client,
|
||||
|
|
Loading…
Reference in a new issue