summaryrefslogtreecommitdiffhomepage
path: root/ipn/message.go
diff options
context:
space:
mode:
Diffstat (limited to 'ipn/message.go')
-rw-r--r--ipn/message.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/ipn/message.go b/ipn/message.go
index d8b7d1396..fb5638eca 100644
--- a/ipn/message.go
+++ b/ipn/message.go
@@ -104,7 +104,9 @@ func NewBackendServer(logf logger.Logf, b Backend, sendNotifyMsg func(Notify)) *
b: b,
sendNotifyMsg: sendNotifyMsg,
}
- if sendNotifyMsg != nil {
+ // b may be nil if the BackendServer is being created just to
+ // encapsulate and send an error message.
+ if sendNotifyMsg != nil && b != nil {
b.SetNotifyCallback(bs.send)
}
return bs