aboutsummaryrefslogtreecommitdiff
path: root/swaybar/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'swaybar/main.c')
-rw-r--r--swaybar/main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/swaybar/main.c b/swaybar/main.c
index 60687bc5..d992b154 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);
}