Merge pull request #4539 from nextcloud/ezaquarii/fix-npe-crash-in-ocfilelistfragment

Fix NPE crash in OCFileListFragment when action mode is destroyed
This commit is contained in:
Tobias Kaminsky 2019-09-27 09:08:24 +02:00 committed by GitHub
commit f64485f279
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -643,8 +643,11 @@ public class OCFileListFragment extends ExtendedListFragment implements
mActiveActionMode = null; mActiveActionMode = null;
// reset to previous color // reset to previous color
ThemeUtils.colorStatusBar(getActivity(), mSystemBarColor); final FragmentActivity activity = getActivity();
ThemeUtils.colorToolbarProgressBar(getActivity(), mProgressBarColor); if (activity != null) {
ThemeUtils.colorStatusBar(activity, mSystemBarColor);
ThemeUtils.colorToolbarProgressBar(activity, mProgressBarColor);
}
// show FAB on multi selection mode exit // show FAB on multi selection mode exit
if (!mHideFab && !searchFragment) { if (!mHideFab && !searchFragment) {