mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-12-25 16:38:50 -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() {
|
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
|
// divert to card is special
|
||||||
if (mSecretKey.getS2K().getProtectionMode() == S2K.GNU_PROTECTION_MODE_DIVERT_TO_CARD) {
|
if (mSecretKey.getS2K().getProtectionMode() == S2K.GNU_PROTECTION_MODE_DIVERT_TO_CARD) {
|
||||||
return SecretKeyType.DIVERT_TO_CARD;
|
return SecretKeyType.DIVERT_TO_CARD;
|
||||||
|
Loading…
Reference in New Issue
Block a user