ipn: add missing check for nil Notify.Prefs

This was missed in 6afe26575c

Signed-off-by: Maisem Ali <maisem@tailscale.com>
pull/6196/head
Maisem Ali 2 years ago committed by Maisem Ali
parent 6afe26575c
commit bb2cba0cd1

@ -106,7 +106,7 @@ func (n Notify) String() string {
if n.State != nil { if n.State != nil {
fmt.Fprintf(&sb, "state=%v ", *n.State) fmt.Fprintf(&sb, "state=%v ", *n.State)
} }
if n.Prefs.Valid() { if n.Prefs != nil && n.Prefs.Valid() {
fmt.Fprintf(&sb, "%v ", n.Prefs.Pretty()) fmt.Fprintf(&sb, "%v ", n.Prefs.Pretty())
} }
if n.NetMap != nil { if n.NetMap != nil {

Loading…
Cancel
Save