Null check if renderer is null

Local colors are added before the renderer is created which is causing
crash

Fixes: 203613925
Test: switch to user back and forward
Change-Id: I2f169434e1cb0e692045050e255d24d1f8fa7c47
This commit is contained in:
Jay Aliomer
2021-10-20 11:17:01 -04:00
parent 618c83b000
commit df34a4a481

View File

@@ -238,9 +238,7 @@ public class ImageWallpaper extends WallpaperService {
Bitmap bitmap = mMiniBitmap;
if (bitmap == null) {
mLocalColorsToAdd.addAll(regions);
mRenderer.use(b -> {
updateMiniBitmapAndNotify(b);
});
if (mRenderer != null) mRenderer.use(this::updateMiniBitmapAndNotify);
} else {
computeAndNotifyLocalColors(regions, bitmap);
}