Fix crash: use wlr_output->name instead of possibly missing oc->name

Fixes segfault on start:
https://gist.github.com/yorickvP/89eccb3782c6edb22aeda6ce9c6d4fcb
This commit is contained in:
Yorick van Pelt 2020-02-13 12:54:48 +01:00 committed by Simon Ser
parent 7999845357
commit 447967ad3a

View file

@ -383,7 +383,7 @@ bool apply_output_config(struct output_config *oc, struct sway_output *output) {
sway_log(SWAY_DEBUG, "Auto-detected output scale: %f", scale); sway_log(SWAY_DEBUG, "Auto-detected output scale: %f", scale);
} }
if (scale != wlr_output->scale) { if (scale != wlr_output->scale) {
sway_log(SWAY_DEBUG, "Set %s scale to %f", oc->name, scale); sway_log(SWAY_DEBUG, "Set %s scale to %f", wlr_output->name, scale);
wlr_output_set_scale(wlr_output, scale); wlr_output_set_scale(wlr_output, scale);
} }