aboutsummaryrefslogtreecommitdiff
path: root/swaybar/bar.c
diff options
context:
space:
mode:
Diffstat (limited to 'swaybar/bar.c')
-rw-r--r--swaybar/bar.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/swaybar/bar.c b/swaybar/bar.c
index a34e4ad5..1439a11c 100644
--- a/swaybar/bar.c
+++ b/swaybar/bar.c
@@ -155,10 +155,12 @@ bool determine_bar_visibility(struct swaybar *bar, bool moving_layer) {
if (visible != bar->visible) {
bar->visible = visible;
- wlr_log(WLR_DEBUG, "Sending %s signal to status command",
- visible ? "cont" : "stop");
- kill(bar->status->pid,
- visible ? bar->status->cont_signal : bar->status->stop_signal);
+ if (bar->status) {
+ wlr_log(WLR_DEBUG, "Sending %s signal to status command",
+ visible ? "cont" : "stop");
+ kill(bar->status->pid, visible ?
+ bar->status->cont_signal : bar->status->stop_signal);
+ }
}
return visible;