From 06077bd353326f1f9a25299330d2d7d7dd16be6c Mon Sep 17 00:00:00 2001 From: cepprice Date: Fri, 5 Mar 2021 22:13:14 +0500 Subject: [PATCH] Fix NPE --- .../plus/settings/fragments/ProfileAppearanceFragment.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java b/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java index 32136b8c09..a8a765c253 100644 --- a/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java @@ -310,7 +310,7 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment implements O outState.putString(PROFILE_STRINGKEY_KEY, changedProfile.stringKey); outState.putInt(PROFILE_ICON_RES_KEY, changedProfile.iconRes); outState.putSerializable(PROFILE_COLOR_KEY, changedProfile.color); - outState.putInt(PROFILE_CUSTOM_COLOR_KEY, changedProfile.customColor); + outState.putSerializable(PROFILE_CUSTOM_COLOR_KEY, changedProfile.customColor); if (changedProfile.parent != null) { outState.putString(PROFILE_PARENT_KEY, changedProfile.parent.getStringKey()); } @@ -325,7 +325,7 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment implements O changedProfile.stringKey = savedInstanceState.getString(PROFILE_STRINGKEY_KEY); changedProfile.iconRes = savedInstanceState.getInt(PROFILE_ICON_RES_KEY); changedProfile.color = (ProfileIconColors) savedInstanceState.getSerializable(PROFILE_COLOR_KEY); - changedProfile.customColor = savedInstanceState.getInt(PROFILE_CUSTOM_COLOR_KEY); + changedProfile.customColor = (Integer) savedInstanceState.getSerializable(PROFILE_CUSTOM_COLOR_KEY); String parentStringKey = savedInstanceState.getString(PROFILE_PARENT_KEY); changedProfile.parent = ApplicationMode.valueOfStringKey(parentStringKey, null); isBaseProfileImported = savedInstanceState.getBoolean(IS_BASE_PROFILE_IMPORTED);