diff --git a/account.go b/account.go index 85ac09f1..8b7798a0 100644 --- a/account.go +++ b/account.go @@ -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 }