mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 11:18:21 +00:00
Prevent crashes if wallpapercolors are null
This commit is contained in:
@@ -60,7 +60,7 @@ public class WallpaperColorInfoVOMR1 extends WallpaperColorInfo implements OnCol
|
||||
|
||||
@Override
|
||||
public int getActualMainColor() {
|
||||
return mColors.getPrimaryColor().toArgb();
|
||||
return mColors == null ? -1 : mColors.getPrimaryColor().toArgb();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -70,13 +70,13 @@ public class WallpaperColorInfoVOMR1 extends WallpaperColorInfo implements OnCol
|
||||
|
||||
@Override
|
||||
public int getActualSecondaryColor() {
|
||||
Color secondary = mColors.getSecondaryColor();
|
||||
Color secondary = mColors == null ? null : mColors.getSecondaryColor();
|
||||
return secondary == null ? -1 : secondary.toArgb();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTertiaryColor() {
|
||||
Color tertiary = mColors.getTertiaryColor();
|
||||
Color tertiary = mColors == null ? null : mColors.getTertiaryColor();
|
||||
return tertiary == null ? -1 : tertiary.toArgb();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user