bug 712536 - null pointer crash when rotating about:home r=mfinkle

This commit is contained in:
Brad Lassey 2011-12-21 00:17:16 -05:00
parent f102d9d930
commit a6bcd0cfcb

View File

@ -215,8 +215,10 @@ public class AboutHomeContent extends ScrollView {
@Override
public void onConfigurationChanged(Configuration newConfig) {
mTopSitesGrid.setNumColumns(getNumberOfColumns());
mTopSitesAdapter.notifyDataSetChanged();
if (mTopSitesGrid != null)
mTopSitesGrid.setNumColumns(getNumberOfColumns());
if (mTopSitesAdapter != null)
mTopSitesAdapter.notifyDataSetChanged();
super.onConfigurationChanged(newConfig);
}