From aa278ef1ea90aee67b3ac2fa65ae8ad2185c9c36 Mon Sep 17 00:00:00 2001 From: Brian Nicholson Date: Mon, 7 Jan 2013 15:14:01 -0800 Subject: [PATCH] Bug 826267 - Check for null tab before setting private AwesomeScreen state. r=sriram --- mobile/android/base/awesomebar/AllPagesTab.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mobile/android/base/awesomebar/AllPagesTab.java b/mobile/android/base/awesomebar/AllPagesTab.java index 90044c7455ec..db33155f20bf 100644 --- a/mobile/android/base/awesomebar/AllPagesTab.java +++ b/mobile/android/base/awesomebar/AllPagesTab.java @@ -602,7 +602,9 @@ public class AllPagesTab extends AwesomeBarTab implements GeckoEventListener { mSuggestionsOptInPrompt = LayoutInflater.from(mContext).inflate(R.layout.awesomebar_suggestion_prompt, (LinearLayout)getView(), false); GeckoTextView promptText = (GeckoTextView) mSuggestionsOptInPrompt.findViewById(R.id.suggestions_prompt_title); promptText.setText(getResources().getString(R.string.suggestions_prompt, mSearchEngines.get(0).name)); - promptText.setPrivateMode(Tabs.getInstance().getSelectedTab().isPrivate()); + Tab tab = Tabs.getInstance().getSelectedTab(); + if (tab != null) + promptText.setPrivateMode(tab.isPrivate()); final View yesButton = mSuggestionsOptInPrompt.findViewById(R.id.suggestions_prompt_yes); final View noButton = mSuggestionsOptInPrompt.findViewById(R.id.suggestions_prompt_no);