From 70366e6b76f9958dd61947eaaba4a4dbe3423058 Mon Sep 17 00:00:00 2001 From: Alexey Kulish Date: Sat, 30 Jan 2016 11:02:12 +0300 Subject: [PATCH] Fix https://github.com/osmandapp/Osmand/issues/2179 --- .../net/osmand/plus/audionotes/NotesFragment.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/audionotes/NotesFragment.java b/OsmAnd/src/net/osmand/plus/audionotes/NotesFragment.java index 623160e952..25deccb1a7 100644 --- a/OsmAnd/src/net/osmand/plus/audionotes/NotesFragment.java +++ b/OsmAnd/src/net/osmand/plus/audionotes/NotesFragment.java @@ -53,9 +53,6 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; -/** - * Created by Denis on 18.02.2015. - */ public class NotesFragment extends OsmAndListFragment { private static final Log LOG = PlatformUtil.getLog(NotesFragment.class); @@ -170,9 +167,12 @@ public class NotesFragment extends OsmAndListFragment { private void enableSelectionMode(boolean selectionMode) { this.selectionMode = selectionMode; - getView().findViewById(R.id.select_all).setVisibility(selectionMode? View.VISIBLE : View.GONE); - ((FavoritesActivity)getActivity()).setToolbarVisibility(!selectionMode && - AndroidUiHelper.isOrientationPortrait(getActivity())); + View view = getView(); + if (view != null) { + view.findViewById(R.id.select_all).setVisibility(selectionMode ? View.VISIBLE : View.GONE); + ((FavoritesActivity) getActivity()).setToolbarVisibility(!selectionMode && + AndroidUiHelper.isOrientationPortrait(getActivity())); + } } private void updateSelectionTitle(ActionMode m){