aboutsummaryrefslogtreecommitdiff
path: root/swaybar
diff options
context:
space:
mode:
authorRyan Dwyer <ryandwyer1@gmail.com>2018-10-23 18:38:01 +1000
committerRyan Dwyer <ryandwyer1@gmail.com>2018-10-23 18:38:01 +1000
commit851b442f73a164c7e97cdefacca44a4517076a2c (patch)
tree76c055bb612b6914c42b8e78e6449b86b4efdf2a /swaybar
parenta5cb4cca15273f20a218cb96fc4da26e4e8da72c (diff)
Fix swaybar crash when there's no status_command
Diffstat (limited to 'swaybar')
-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;