check resp != nil before resp.Sw
This commit is contained in:
parent
07b455f49c
commit
24b0082888
|
@ -108,7 +108,7 @@ func (cs *CommandSet) Pair(pairingPass string) error {
|
|||
|
||||
cmd := NewCommandPairFirstStep(challenge)
|
||||
resp, err := cs.c.Send(cmd)
|
||||
if resp.Sw == SwNoAvailablePairingSlots {
|
||||
if resp != nil && resp.Sw == SwNoAvailablePairingSlots {
|
||||
return ErrNoAvailablePairingSlots
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue