Fix rare NPE in DropBoxManagerService

Change-Id: I2e9713802c59feb539d5d4c1ab1dfa21ec88d9f6
This commit is contained in:
Dan Egnor
2010-03-10 16:49:55 -08:00
parent c357df1261
commit f283e36210

View File

@@ -603,7 +603,9 @@ public final class DropBoxManagerService extends IDropBoxManagerService.Stub {
for (EntryFile late : future) {
mAllFiles.blocks -= late.blocks;
FileList tagFiles = mFilesByTag.get(late.tag);
if (tagFiles.contents.remove(late)) tagFiles.blocks -= late.blocks;
if (tagFiles != null && tagFiles.contents.remove(late)) {
tagFiles.blocks -= late.blocks;
}
if ((late.flags & DropBoxManager.IS_EMPTY) == 0) {
enrollEntry(new EntryFile(
late.file, mDropBoxDir, late.tag, t++, late.flags, mBlockSize));