Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f283e362 authored by Dan Egnor's avatar Dan Egnor
Browse files

Fix rare NPE in DropBoxManagerService

Change-Id: I2e9713802c59feb539d5d4c1ab1dfa21ec88d9f6
parent c357df12
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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));