mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
output: fix wlr_output_preferred_mode fallback
`mode` points to an invalid pointer (head of the list) when the loop stops. Closes: https://github.com/swaywm/sway/issues/4717
This commit is contained in:
parent
7fc58e704a
commit
98cd11c019
1 changed files with 1 additions and 1 deletions
|
|
@ -406,7 +406,7 @@ struct wlr_output_mode *wlr_output_preferred_mode(struct wlr_output *output) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// No preferred mode, choose the last one
|
// No preferred mode, choose the last one
|
||||||
return mode;
|
return wl_container_of(output->modes.prev, mode, link);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void output_state_clear_buffer(struct wlr_output_state *state) {
|
static void output_state_clear_buffer(struct wlr_output_state *state) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue