Fix potential nil dereference

This commit is contained in:
Ingo Oppermann 2023-07-23 16:15:01 +02:00
parent eea1e2e517
commit 6789dbb783
No known key found for this signature in database
GPG Key ID: 2AB32426E9DD229E

View File

@ -880,6 +880,14 @@ func (n *node) ProxyProcessList() ([]Process, error) {
processes := []Process{}
for _, p := range list {
if p.State == nil {
p.State = &clientapi.ProcessState{}
}
if p.Config == nil {
p.Config = &clientapi.ProcessConfig{}
}
process := Process{
NodeID: nodeid,
Order: p.State.Order,