diff --git a/app/src/main/java/eu/faircode/email/FragmentCompose.java b/app/src/main/java/eu/faircode/email/FragmentCompose.java
index b8f46b17e3..4f1ede186a 100644
--- a/app/src/main/java/eu/faircode/email/FragmentCompose.java
+++ b/app/src/main/java/eu/faircode/email/FragmentCompose.java
@@ -1927,6 +1927,8 @@ public class FragmentCompose extends FragmentBase {
}
} else if (OpenPgpApi.ACTION_GET_SIGN_KEY_ID.equals(data.getAction())) {
pgpSignKeyId = result.getLongExtra(OpenPgpApi.EXTRA_SIGN_KEY_ID, -1);
+ if (pgpSignKeyId == 0)
+ throw new IllegalArgumentException(context.getString(R.string.title_no_sign_key));
db.identity().setIdentitySignKey(identity.id, pgpSignKeyId);
// Get public key
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index be323beb41..62f7528aeb 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -814,6 +814,7 @@
Transferring to OpenKeychain
Verify the signature to show the message text
Message is not signed or encrypted
+ No sign key selected
Reset sign key
Message not signed