From 92f510a6472064f4e4cb47ffb4f81898fc0a62ae Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sat, 6 Sep 2025 00:09:25 +0900 Subject: 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 --- cmd/hakurei/command.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'cmd') 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 + } } } -- cgit v1.3.1