forked from security/hakurei
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>
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user