From 32b2711e6184721ceb74c4220b86295f0e51e5ad Mon Sep 17 00:00:00 2001 From: Ashley Hughes Date: Tue, 17 Sep 2013 18:31:02 +0100 Subject: [PATCH] null check --- .../org/sufficientlysecure/keychain/pgp/PgpImportExport.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/pgp/PgpImportExport.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/pgp/PgpImportExport.java index dac9c9b11..d7ab5d8fe 100644 --- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/pgp/PgpImportExport.java +++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/pgp/PgpImportExport.java @@ -272,7 +272,8 @@ public class PgpImportExport { } newPubRing = PGPPublicKeyRing.insertPublicKey(newPubRing, key); } - ProviderHelper.saveKeyRing(mContext, newPubRing); + if (newPubRing != null) + ProviderHelper.saveKeyRing(mContext, newPubRing); // TODO: remove status returns, use exceptions! status = Id.return_value.ok; }