diff options
author | 2019-12-31 12:53:30 +0000 | |
---|---|---|
committer | 2019-12-31 15:56:32 +0100 | |
commit | 2b5e75032b09922b0cc06eb0454e6beace8908d7 (patch) | |
tree | 1756a1cfdd4f3c55cab103ca7ebf365ff427e89d /sway | |
parent | Re-add support for wlr_output's atomic API (diff) | |
download | sway-2b5e75032b09922b0cc06eb0454e6beace8908d7.tar.gz sway-2b5e75032b09922b0cc06eb0454e6beace8908d7.tar.zst sway-2b5e75032b09922b0cc06eb0454e6beace8908d7.zip |
Fix sway_log using non initialised output_config pointer
This fixes a crash where the `oc->name` would be accessed by sway_log()
even when `oc` was NULL.
Diffstat (limited to 'sway')
-rw-r--r-- | sway/config/output.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/config/output.c b/sway/config/output.c index b8b028e6..8ea6c9f4 100644 --- a/sway/config/output.c +++ b/sway/config/output.c | |||
@@ -334,7 +334,7 @@ bool apply_output_config(struct output_config *oc, struct sway_output *output) { | |||
334 | } | 334 | } |
335 | 335 | ||
336 | if (!oc || oc->dpms_state != DPMS_OFF) { | 336 | if (!oc || oc->dpms_state != DPMS_OFF) { |
337 | sway_log(SWAY_DEBUG, "Turning on output %s", oc->name); | 337 | sway_log(SWAY_DEBUG, "Turning on output %s", wlr_output->name); |
338 | wlr_output_enable(wlr_output, true); | 338 | wlr_output_enable(wlr_output, true); |
339 | 339 | ||
340 | if (oc && oc->width > 0 && oc->height > 0) { | 340 | if (oc && oc->width > 0 && oc->height > 0) { |