From 0f7614306d7d995dfec8b0e99dad2439cd4d3834 Mon Sep 17 00:00:00 2001 From: Mikkel Oscar Lyderik Date: Thu, 17 Dec 2015 02:45:14 +0100 Subject: [PATCH] swaybar: Check that registry is set before teardown --- swaybar/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/swaybar/main.c b/swaybar/main.c index 60687bc51..d992b1544 100644 --- a/swaybar/main.c +++ b/swaybar/main.c @@ -87,7 +87,9 @@ struct colors colors = { void sway_terminate(void) { window_teardown(window); - registry_teardown(registry); + if (registry) { + registry_teardown(registry); + } exit(EXIT_FAILURE); }