summaryrefslogtreecommitdiff
path: root/src/keypair.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/keypair.go')
-rw-r--r--src/keypair.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/keypair.go b/src/keypair.go
index 7e5297b..283cb92 100644
--- a/src/keypair.go
+++ b/src/keypair.go
@@ -38,5 +38,7 @@ func (kp *KeyPairs) Current() *KeyPair {
}
func (device *Device) DeleteKeyPair(key *KeyPair) {
- device.indices.Delete(key.localIndex)
+ if key != nil {
+ device.indices.Delete(key.localIndex)
+ }
}