Guard for null theme when getting them res

This commit is contained in:
Simão Mata 2020-03-14 10:40:13 +01:00
parent e7ea8d4dfc
commit 8af307da28
1 changed files with 3 additions and 0 deletions

View File

@ -58,6 +58,9 @@ public final class ThemeUtil {
} }
private static int getThemeRes(Context context, String theme) { private static int getThemeRes(Context context, String theme) {
if(theme == null)
return R.style.Theme_Audinaut_Light;
switch (theme) { switch (theme) {
case THEME_DARK: case THEME_DARK:
return R.style.Theme_Audinaut_Dark; return R.style.Theme_Audinaut_Dark;