зеркало из https://github.com/mozilla/gecko-dev.git
Bug 825992 - Safeguard against null closing AboutHome with a null top sites adapter. r=mfinkle
This commit is contained in:
Родитель
02fa2842cd
Коммит
d9413a98c6
|
@ -254,10 +254,11 @@ public class AboutHomeContent extends ScrollView
|
|||
mAccountListener = null;
|
||||
}
|
||||
|
||||
Cursor cursor = mTopSitesAdapter.getCursor();
|
||||
if (cursor != null && !cursor.isClosed())
|
||||
cursor.close();
|
||||
|
||||
if (mTopSitesAdapter != null) {
|
||||
Cursor cursor = mTopSitesAdapter.getCursor();
|
||||
if (cursor != null && !cursor.isClosed())
|
||||
cursor.close();
|
||||
}
|
||||
}
|
||||
|
||||
void setLastTabsVisibility(boolean visible) {
|
||||
|
|
|
@ -315,6 +315,7 @@ public class BrowserDB {
|
|||
String title = c.getString(c.getColumnIndex(URLColumns.TITLE));
|
||||
mPinnedSites.put(pos, new PinnedSite(title, url));
|
||||
} while (c.moveToNext());
|
||||
c.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче