App crashes when I click on contact logo
Hi,
I've not found a recent issue related to my issue.

Thanks for your answer

### Expected behavior
It should be create a new message with the clicked contact, as recipient.

### Actual behavior
Since the update, the app crashes when I click on contact logo square.

### Steps to reproduce
1. Open the app
2. Click on the logo square of any email
3. The app will crash

### Environment
K-9 Mail version: 5.403

Android version: 5.1 with Flyme 6.2.0.0A

Account type (IMAP, POP3, WebDAV/Exchange): IMAP with Gmail

diff --git a/k9mail/src/main/java/com/fsck/k9/ui/ContactBadge.java b/k9mail/src/main/java/com/fsck/k9/ui/ContactBadge.java
index fbea32426..6a09fedca 100644
--- a/k9mail/src/main/java/com/fsck/k9/ui/ContactBadge.java
+++ b/k9mail/src/main/java/com/fsck/k9/ui/ContactBadge.java
@@ -1,6 +1,7 @@
 package com.fsck.k9.ui;
 
 
+import android.content.ActivityNotFoundException;
 import android.content.AsyncQueryHandler;
 import android.content.ContentResolver;
 import android.content.Context;
@@ -20,6 +21,9 @@ import android.view.View.OnClickListener;
 import android.view.accessibility.AccessibilityEvent;
 import android.view.accessibility.AccessibilityNodeInfo;
 import android.widget.ImageView;
+import android.widget.Toast;
+
+import com.fsck.k9.R;
 
 
 /**
@@ -207,10 +211,14 @@ public class ContactBadge extends ImageView implements OnClickListener {
                         getContext(), ContactBadge.this, lookupUri, QuickContact.MODE_LARGE, null);
             } else if (createUri != null) {
                 // Prompt user to add this person to contacts
-                final Intent intent = new Intent(Intents.SHOW_OR_CREATE_CONTACT, createUri);
-                extras.remove(EXTRA_URI_CONTENT);
-                intent.putExtras(extras);
-                getContext().startActivity(intent);
+                try {
+                    final Intent intent = new Intent(Intents.SHOW_OR_CREATE_CONTACT, createUri);
+                    extras.remove(EXTRA_URI_CONTENT);
+                    intent.putExtras(extras);
+                    getContext().startActivity(intent);
+                } catch (ActivityNotFoundException e) {
+                    Toast.makeText(getContext(), R.string.error_activity_not_found, Toast.LENGTH_LONG).show();
+                }
             }
         }
     }
['k9mail/src/main/java/com/fsck/k9/ui/ContactBadge.java']