Fixed a possible null pointer exception in showListsHelp()

pull/14/head
Sam Bosley 13 years ago
parent 6a6d237a68
commit 9c51674b90

@ -894,12 +894,14 @@ public class TaskListFragment extends ListFragment implements OnScrollListener,
return;
if (!Preferences.getBoolean(
R.string.p_showed_lists_help, false)) {
if (AndroidUtilities.isTabletSized(getActivity())) {
((AstridActivity) getActivity()).getFilterListFragment().showAddListPopover();
AstridActivity activity = (AstridActivity) getActivity();
if (activity != null) {
if (AndroidUtilities.isTabletSized(activity)) {
activity.getFilterListFragment().showAddListPopover();
} else {
ActionBar ab = ((AstridActivity) getActivity()).getSupportActionBar();
ActionBar ab = activity.getSupportActionBar();
View anchor = ab.getCustomView().findViewById(R.id.lists_nav);
HelpInfoPopover.showPopover(getActivity(),
HelpInfoPopover.showPopover(activity,
anchor, R.string.help_popover_switch_lists, null);
}
Preferences.setBoolean(
@ -907,6 +909,7 @@ public class TaskListFragment extends ListFragment implements OnScrollListener,
true);
}
}
}
/*
* ======================================================================

Loading…
Cancel
Save