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); }