From 2301349ad59751640ed9e59dd22edeafaf09da39 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Thu, 17 Jan 2019 20:16:23 +1000 Subject: Use noop output when there's no outputs connected Instead of having NULL workspace->output pointers, use a noop output. This should be safer. --- sway/desktop/output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sway/desktop/output.c') diff --git a/sway/desktop/output.c b/sway/desktop/output.c index edf77fbc..f18a118f 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c @@ -386,7 +386,7 @@ static void damage_handle_frame(struct wl_listener *listener, void *data) { void output_damage_whole(struct sway_output *output) { // The output can exist with no wlr_output if it's just been disconnected // and the transaction to evacuate it has't completed yet. - if (output && output->wlr_output) { + if (output && output->wlr_output && output->damage) { wlr_output_damage_add_whole(output->damage); } } -- cgit v1.2.3