From 2b5e75032b09922b0cc06eb0454e6beace8908d7 Mon Sep 17 00:00:00 2001 From: Paul Riou Date: Tue, 31 Dec 2019 12:53:30 +0000 Subject: 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. --- sway/config/output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sway/config') 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) { } if (!oc || oc->dpms_state != DPMS_OFF) { - sway_log(SWAY_DEBUG, "Turning on output %s", oc->name); + sway_log(SWAY_DEBUG, "Turning on output %s", wlr_output->name); wlr_output_enable(wlr_output, true); if (oc && oc->width > 0 && oc->height > 0) { -- cgit v1.2.3