aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmd
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-09-06 00:09:25 +0900
committerOphestra <cat@gensokyo.uk>2025-09-06 00:09:25 +0900
commit92f510a6472064f4e4cb47ffb4f81898fc0a62ae (patch)
tree605c40792d2abfa9d129de7117619a992fca88eb /cmd
parentacb6931f3e4af62f92dc2ef85ef7c1ac9f7867e4 (diff)
cmd/hakurei/command: pd run dbus-verbose nil check
This otherwise dereferences a nil pointer when dbus-verbose is set and either session or system bus are nil. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/hakurei/command.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/cmd/hakurei/command.go b/cmd/hakurei/command.go
index d706bd21..0ce3b71c 100644
--- a/cmd/hakurei/command.go
+++ b/cmd/hakurei/command.go
@@ -162,8 +162,12 @@ func buildCommand(out io.Writer) command.Command {
// override log from configuration
if dbusVerbose {
- config.SessionBus.Log = true
- config.SystemBus.Log = true
+ if config.SessionBus != nil {
+ config.SessionBus.Log = true
+ }
+ if config.SystemBus != nil {
+ config.SystemBus.Log = true
+ }
}
}