diff options
Diffstat (limited to 'sway/swaynag.c')
-rw-r--r-- | sway/swaynag.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sway/swaynag.c b/sway/swaynag.c index d905db2b..38e74b88 100644 --- a/sway/swaynag.c +++ b/sway/swaynag.c | |||
@@ -11,6 +11,10 @@ | |||
11 | 11 | ||
12 | bool swaynag_spawn(const char *swaynag_command, | 12 | bool swaynag_spawn(const char *swaynag_command, |
13 | struct swaynag_instance *swaynag) { | 13 | struct swaynag_instance *swaynag) { |
14 | if (!swaynag_command) { | ||
15 | return true; | ||
16 | } | ||
17 | |||
14 | if (swaynag->detailed) { | 18 | if (swaynag->detailed) { |
15 | if (pipe(swaynag->fd) != 0) { | 19 | if (pipe(swaynag->fd) != 0) { |
16 | wlr_log(WLR_ERROR, "Failed to create pipe for swaynag"); | 20 | wlr_log(WLR_ERROR, "Failed to create pipe for swaynag"); |
@@ -58,6 +62,10 @@ void swaynag_kill(struct swaynag_instance *swaynag) { | |||
58 | 62 | ||
59 | void swaynag_log(const char *swaynag_command, struct swaynag_instance *swaynag, | 63 | void swaynag_log(const char *swaynag_command, struct swaynag_instance *swaynag, |
60 | const char *fmt, ...) { | 64 | const char *fmt, ...) { |
65 | if (!swaynag_command) { | ||
66 | return; | ||
67 | } | ||
68 | |||
61 | if (!swaynag->detailed) { | 69 | if (!swaynag->detailed) { |
62 | wlr_log(WLR_ERROR, "Attempting to write to non-detailed swaynag inst"); | 70 | wlr_log(WLR_ERROR, "Attempting to write to non-detailed swaynag inst"); |
63 | return; | 71 | return; |