Loading an account from file should fail if a integral part is nil.

Fixes #191
This commit is contained in:
xenolf 2016-04-22 01:53:50 +02:00
parent 96a24777ff
commit d93c71b61f

View file

@ -64,6 +64,14 @@ func NewAccount(email string, conf *Configuration) *Account {
acc.key = privKey
acc.conf = conf
if acc.Registration == nil {
logger().Fatalf("Could not load account for %s. Registration is nil.", email)
}
if acc.conf == nil {
logger().Fatalf("Could not load account for %s. Configuration is nil.", email)
}
return &acc
}