Avoid NullPointerException reported via Google Play
This commit is contained in:
parent
bd4b7d3664
commit
5c93f105ea
1 changed files with 5 additions and 3 deletions
|
@ -772,9 +772,11 @@ public class LocalStore extends Store implements Serializable {
|
|||
public Long doDbWork(final SQLiteDatabase db) {
|
||||
final File[] files = attachmentDirectory.listFiles();
|
||||
long attachmentLength = 0;
|
||||
for (File file : files) {
|
||||
if (file.exists()) {
|
||||
attachmentLength += file.length();
|
||||
if (files != null) {
|
||||
for (File file : files) {
|
||||
if (file.exists()) {
|
||||
attachmentLength += file.length();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue