Bug 1080016 - Display favicons properly after interrupted page loads, r=ckitching

This commit is contained in:
Mark Capella 2014-10-08 20:41:15 -04:00
Родитель f6ebcf9b37
Коммит 32350bb8de
1 изменённых файлов: 8 добавлений и 1 удалений

Просмотреть файл

@ -1013,7 +1013,14 @@ public class LocalBrowserDB {
try {
if (c.moveToFirst()) {
return c.getString(c.getColumnIndexOrThrow(History.FAVICON_URL));
// Interrupted page loads can leave History items without a valid favicon_id.
final int columnIndex = c.getColumnIndexOrThrow(History.FAVICON_URL);
if (!c.isNull(columnIndex)) {
final String faviconURL = c.getString(columnIndex);
if (faviconURL != null) {
return faviconURL;
}
}
}
} finally {
c.close();