Skip to content

Commit

Permalink
Merge pull request #79 from ptrstpp950/patch-1
Browse files Browse the repository at this point in the history
Avoid NullPointerException
  • Loading branch information
mattosaurus authored Jul 29, 2020
2 parents 1889c8d + 009617b commit b5c3a65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PgpCore/Utilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ public static PgpPublicKey ReadPublicKey(Stream inputStream)
{
foreach (PgpSignature s in key.GetSignatures())
{
if (s.GetHashedSubPackets().GetKeyFlags() == encryptKeyFlags)
if (s.HasSubpackets && s.GetHashedSubPackets().GetKeyFlags() == encryptKeyFlags)
return key;
}
}
Expand Down

0 comments on commit b5c3a65

Please sign in to comment.