Skip to content

Commit

Permalink
Fix nil pointer exception for device only msgs
Browse files Browse the repository at this point in the history
  • Loading branch information
DerAndereAndi committed Dec 10, 2024
1 parent 2cbd92f commit 9ef7bed
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions examples/remote/ucs.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,12 @@ func (r *Remote) PropagateEvent(
) {
params := make(map[string]interface{}, 2)
params["ski"] = ski
params["device"] = device.Address()
params["entity"] = entity.Address()
if device != nil {
params["device"] = device.Address()
}
if entity != nil {
params["entity"] = entity.Address()
}
for _, conn := range r.connections {
_ = conn.Notify(context.Background(), string(event), params)
}
Expand Down

0 comments on commit 9ef7bed

Please sign in to comment.