api example: fix crash when no signature is present

This commit is contained in:
Dominik Schürmann 2014-02-21 15:49:08 +01:00
parent c2013c9ca8
commit f6da3e80e6

View File

@ -185,7 +185,7 @@ public class OpenPgpProviderActivity extends Activity {
Log.e(Constants.TAG, "UnsupportedEncodingException", e);
}
if (result.containsKey(OpenPgpConstants.RESULT_SIGNATURE)) {
if (result.getBoolean(OpenPgpConstants.RESULT_SIGNATURE, false)) {
OpenPgpSignatureResult sigResult
= result.getParcelable(OpenPgpConstants.RESULT_SIGNATURE);
handleSignature(sigResult);