diff --git a/mobile/android/base/BrowserToolbar.java b/mobile/android/base/BrowserToolbar.java index 567f0a68260..ff8338f85c0 100644 --- a/mobile/android/base/BrowserToolbar.java +++ b/mobile/android/base/BrowserToolbar.java @@ -705,7 +705,7 @@ public class BrowserToolbar implements ViewSwitcher.ViewFactory, if (Tabs.getInstance().getSelectedTab().getState() == Tab.STATE_LOADING) return; - if (image != null && image.getWidth() > 0 && image.getHeight() > 0) { + if (image != null) { image = Bitmap.createScaledBitmap(image, mFaviconSize, mFaviconSize, false); mFavicon.setImageBitmap(image); } else { diff --git a/mobile/android/base/Favicons.java b/mobile/android/base/Favicons.java index 79091de5917..44c23680968 100644 --- a/mobile/android/base/Favicons.java +++ b/mobile/android/base/Favicons.java @@ -296,8 +296,10 @@ public class Favicons { image = downloadFavicon(faviconUrl); - if (image != null) { + if (image != null && image.getWidth() > 0 && image.getHeight() > 0) { saveFaviconToDb(image); + } else { + image = null; } return image;