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

Commit b88597c2 authored by Ricardo Cerqueira's avatar Ricardo Cerqueira
Browse files

AssetAtlas: Fix NPE when there are no preloaded resources

parent 685b9065
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -436,6 +436,9 @@ public class AssetAtlasService extends IAssetAtlas.Stub {
            Log.d(LOG_TAG, String.format("Found best atlas configuration in %.2fs", delay));
            Log.d(LOG_TAG, String.format("Found best atlas configuration in %.2fs", delay));
        }
        }


        // PRELOAD_RESOURCES may have been disabled!
        if (results.size() == 0) return null;

        WorkerResult result = results.get(0);
        WorkerResult result = results.get(0);
        return new Configuration(result.type, result.width, result.height, result.count);
        return new Configuration(result.type, result.width, result.height, result.count);
    }
    }