mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-12-24 16:08:49 -05:00
Add null check to getSecretKeyType
This commit is contained in:
parent
1f5f937d00
commit
d4387c0179
@ -117,7 +117,7 @@ public class CanonicalizedSecretKey extends CanonicalizedPublicKey {
|
||||
}
|
||||
|
||||
public SecretKeyType getSecretKeyType() {
|
||||
if (mSecretKey.getS2K().getType() == S2K.GNU_DUMMY_S2K) {
|
||||
if (mSecretKey.getS2K() != null && mSecretKey.getS2K().getType() == S2K.GNU_DUMMY_S2K) {
|
||||
// divert to card is special
|
||||
if (mSecretKey.getS2K().getProtectionMode() == S2K.GNU_PROTECTION_MODE_DIVERT_TO_CARD) {
|
||||
return SecretKeyType.DIVERT_TO_CARD;
|
||||
|
Loading…
Reference in New Issue
Block a user