Fix nullpointer when revoking keys

This commit is contained in:
Dominik Schürmann 2014-08-21 11:40:48 +02:00
parent 3c46c3c2df
commit 562e379c56

View File

@ -339,7 +339,8 @@ public class EditKeyFragment extends LoaderFragment implements
} else { } else {
mSaveKeyringParcel.mRevokeUserIds.add(userId); mSaveKeyringParcel.mRevokeUserIds.add(userId);
// not possible to revoke and change to primary user id // not possible to revoke and change to primary user id
if (mSaveKeyringParcel.mChangePrimaryUserId.equals(userId)) { if (mSaveKeyringParcel.mChangePrimaryUserId != null
&& mSaveKeyringParcel.mChangePrimaryUserId.equals(userId)) {
mSaveKeyringParcel.mChangePrimaryUserId = null; mSaveKeyringParcel.mChangePrimaryUserId = null;
} }
} }