From 2a27f5005b99cc7efbd605feb20001b2a2d00a9d Mon Sep 17 00:00:00 2001 From: cketti Date: Tue, 14 Feb 2012 00:27:28 +0100 Subject: [PATCH] Fixed rare NullPointerException --- src/com/fsck/k9/EmailAddressAdapter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/fsck/k9/EmailAddressAdapter.java b/src/com/fsck/k9/EmailAddressAdapter.java index d9bb59940..8cb0240d9 100644 --- a/src/com/fsck/k9/EmailAddressAdapter.java +++ b/src/com/fsck/k9/EmailAddressAdapter.java @@ -48,7 +48,7 @@ public class EmailAddressAdapter extends ResourceCursorAdapter { final String name = mContacts.getName(cursor); final String address = mContacts.getEmail(cursor); - return new Address(address, name).toString(); + return (address == null) ? "" : new Address(address, name).toString(); } @Override