diff options
author | 2018-10-23 10:50:36 +0200 | |
---|---|---|
committer | 2018-10-23 10:50:36 +0200 | |
commit | 970501f05e8a1835b880953888ad3022fb2e9ada (patch) | |
tree | 76c055bb612b6914c42b8e78e6449b86b4efdf2a /swaybar/bar.c | |
parent | Advertize dependency on git (diff) | |
parent | Fix swaybar crash when there's no status_command (diff) | |
download | sway-970501f05e8a1835b880953888ad3022fb2e9ada.tar.gz sway-970501f05e8a1835b880953888ad3022fb2e9ada.tar.zst sway-970501f05e8a1835b880953888ad3022fb2e9ada.zip |
Merge pull request #2940 from RyanDwyer/fix-swaybar-crash
Fix swaybar crash when there's no status_command
Diffstat (limited to 'swaybar/bar.c')
-rw-r--r-- | swaybar/bar.c | 10 |
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) { | |||
155 | if (visible != bar->visible) { | 155 | if (visible != bar->visible) { |
156 | bar->visible = visible; | 156 | bar->visible = visible; |
157 | 157 | ||
158 | wlr_log(WLR_DEBUG, "Sending %s signal to status command", | 158 | if (bar->status) { |
159 | visible ? "cont" : "stop"); | 159 | wlr_log(WLR_DEBUG, "Sending %s signal to status command", |
160 | kill(bar->status->pid, | 160 | visible ? "cont" : "stop"); |
161 | visible ? bar->status->cont_signal : bar->status->stop_signal); | 161 | kill(bar->status->pid, visible ? |
162 | bar->status->cont_signal : bar->status->stop_signal); | ||
163 | } | ||
162 | } | 164 | } |
163 | 165 | ||
164 | return visible; | 166 | return visible; |