Contact nil checking
continuous-integration/drone/pr Build is failing
Details
continuous-integration/drone/pr Build is failing
Details
This commit is contained in:
parent
2145d38d15
commit
3aac1dd47a
|
@ -113,7 +113,7 @@ func (p *PeerHelper) GetNick(id string) string {
|
||||||
// we do not have a canonical nick for this contact.
|
// we do not have a canonical nick for this contact.
|
||||||
// re-request if authenticated
|
// re-request if authenticated
|
||||||
// TODO: This check probably doesn't belong here...
|
// TODO: This check probably doesn't belong here...
|
||||||
if p.peer.GetContact(id).State == connections.ConnectionStateName[connections.AUTHENTICATED] {
|
if contact := p.peer.GetContact(id); contact != nil && contact.State == connections.ConnectionStateName[connections.AUTHENTICATED] {
|
||||||
p.peer.SendGetValToPeer(id, attr.PublicScope, constants.Name)
|
p.peer.SendGetValToPeer(id, attr.PublicScope, constants.Name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue