From 9f6ca2270d1d08342c13b7574c8acf97c43a0eba Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 14 Sep 2022 10:29:44 +0200 Subject: [PATCH] fix a crash --- .../java/app/fedilab/android/viewmodel/mastodon/ReorderVM.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/ReorderVM.java b/app/src/main/java/app/fedilab/android/viewmodel/mastodon/ReorderVM.java index 3f603b988..1fcc19ccc 100644 --- a/app/src/main/java/app/fedilab/android/viewmodel/mastodon/ReorderVM.java +++ b/app/src/main/java/app/fedilab/android/viewmodel/mastodon/ReorderVM.java @@ -80,7 +80,7 @@ public class ReorderVM extends AndroidViewModel { SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(getApplication().getApplicationContext()); boolean singleBar = sharedpreferences.getBoolean(getApplication().getApplicationContext().getString(R.string.SET_USE_SINGLE_TOPBAR), false); List pinnedTimelinesToRemove = new ArrayList<>(); - if (!singleBar) { + if (!singleBar && pinned != null) { for (PinnedTimeline pinnedTimeline : pinned.pinnedTimelines) { if (pinnedTimeline.type == Timeline.TimeLineEnum.HOME) { pinnedTimelinesToRemove.add(pinnedTimeline);