Skip to content

Commit

Permalink
ThemeManager: fix crash when no theme is set
Browse files Browse the repository at this point in the history
  • Loading branch information
MCMrARM committed Feb 22, 2019
1 parent f99735a commit 42e8ca9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/src/main/java/io/mrarm/irc/util/theme/ThemeManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,9 @@ public void applyThemeToActivity(Activity activity) {
currentCustomThemePatcher.getAssetManager() : context.getAssets(),
new DisplayMetrics(), c);
Resources.Theme t = r.newTheme();
t.applyStyle(currentTheme.getThemeResId(), true);
IRCColorUtils.loadColors(t, currentTheme.getIRCColorsResId());
ThemeResInfo resInfo = currentTheme != null ? currentTheme : fallbackTheme;
t.applyStyle(resInfo.getThemeResId(), true);
IRCColorUtils.loadColors(t, resInfo.getIRCColorsResId());
mNeedsApplyIrcColors = false;
}
if (currentCustomThemePatcher != null) {
Expand Down

0 comments on commit 42e8ca9

Please sign in to comment.