1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-23 18:02:15 -05:00

Avoid NullPointerException reported via Google Play

This commit is contained in:
cketti 2014-03-23 00:39:10 +01:00
parent bd4b7d3664
commit 5c93f105ea

View File

@ -772,9 +772,11 @@ public class LocalStore extends Store implements Serializable {
public Long doDbWork(final SQLiteDatabase db) { public Long doDbWork(final SQLiteDatabase db) {
final File[] files = attachmentDirectory.listFiles(); final File[] files = attachmentDirectory.listFiles();
long attachmentLength = 0; long attachmentLength = 0;
for (File file : files) { if (files != null) {
if (file.exists()) { for (File file : files) {
attachmentLength += file.length(); if (file.exists()) {
attachmentLength += file.length();
}
} }
} }