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

Commit b6666263 authored by Michael W's avatar Michael W
Browse files

CMFM: Make sure no NPE happens

Fix for the case when getExternalFilesDir returns null

Change-Id: I62725cec0f65412f3cc9c66c0e9870d2da62c6b8
parent 90cb9de1
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -624,6 +624,10 @@ public class SecureConsole extends VirtualMountPointConsole {
     */
    private void clearCache(Context ctx) {
        File filesDir = ctx.getExternalFilesDir(null);
        if (filesDir == null) {
            return;
        }

        File[] cacheFiles = filesDir.listFiles(new FilenameFilter() {
            @Override
            public boolean accept(File dir, String filename) {