Bug 752172 - (Part 2) Protect against null selected tab in SiteIdentityPopup. r=mfinkle

This commit is contained in:
Margaret Leibovic 2012-05-14 11:44:42 -07:00
parent 027ab6d4f5
commit a97bae2ba6

View File

@ -80,7 +80,13 @@ public class SiteIdentityPopup extends PopupWindow {
}
public void show(int leftMargin) {
JSONObject identityData = Tabs.getInstance().getSelectedTab().getIdentityData();
Tab selectedTab = Tabs.getInstance().getSelectedTab();
if (selectedTab == null) {
Log.e(LOGTAG, "Selected tab is null");
return;
}
JSONObject identityData = selectedTab.getIdentityData();
if (identityData == null) {
Log.e(LOGTAG, "Tab has no identity data");
return;