From 89f260c9269e5c747505971db75814455cbd91f8 Mon Sep 17 00:00:00 2001 From: Dima-1 Date: Fri, 24 Jan 2020 19:20:48 +0200 Subject: [PATCH] Fix profile appearance --- .../plus/settings/ProfileAppearanceFragment.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/settings/ProfileAppearanceFragment.java b/OsmAnd/src/net/osmand/plus/settings/ProfileAppearanceFragment.java index 7dcb2d24b2..33329179e6 100644 --- a/OsmAnd/src/net/osmand/plus/settings/ProfileAppearanceFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/ProfileAppearanceFragment.java @@ -450,10 +450,12 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment { } private void updateProfileNameAppearance() { - if (profileName.isFocusable() && profileName.isFocusableInTouchMode()) { - int selectedColor = ContextCompat.getColor(app, changedProfile.color.getColor(isNightMode())); - profileNameOtfb.setPrimaryColor(selectedColor); - profileName.getBackground().mutate().setColorFilter(selectedColor, PorterDuff.Mode.SRC_ATOP); + if (profileName != null) { + if (profileName.isFocusable() && profileName.isFocusableInTouchMode()) { + int selectedColor = ContextCompat.getColor(app, changedProfile.color.getColor(isNightMode())); + profileNameOtfb.setPrimaryColor(selectedColor); + profileName.getBackground().mutate().setColorFilter(selectedColor, PorterDuff.Mode.SRC_ATOP); + } } }