Fixed potential null dereference if the PGP key does not have a private key