mirror of
https://github.com/swaywm/sway.git
synced 2024-11-14 14:34:07 +01:00
config/output: Check if preferred mode is NULL
This commit is contained in:
parent
020a572ed6
commit
4e28bce6d0
@ -278,6 +278,10 @@ static void set_mode(struct wlr_output *output, struct wlr_output_state *pending
|
||||
best->width, best->height, best->refresh / 1000.f, output->name);
|
||||
} else {
|
||||
best = wlr_output_preferred_mode(output);
|
||||
if (!best) {
|
||||
sway_log(SWAY_ERROR, "No preferred mode for output %s", output->name);
|
||||
return;
|
||||
}
|
||||
sway_log(SWAY_INFO, "Configured mode (%dx%d@%.3fHz) not available, "
|
||||
"applying preferred mode (%dx%d@%.3fHz)",
|
||||
width, height, refresh_rate,
|
||||
|
Loading…
Reference in New Issue
Block a user