1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-08-13 17:03:48 -04:00

Avoid NullPointerException (reported via Play Store)

This commit is contained in:
cketti 2013-03-21 23:19:11 +01:00
parent 9ea46cf03b
commit 597e954798

View File

@ -218,6 +218,13 @@ public class AttachmentProvider extends ContentProvider {
return null;
}
if (attachmentInfo == null) {
if (K9.DEBUG) {
Log.d(K9.LOG_TAG, "No attachment info for ID: " + id);
}
return null;
}
MatrixCursor ret = new MatrixCursor(columnNames);
Object[] values = new Object[columnNames.length];
for (int i = 0, count = columnNames.length; i < count; i++) {