Bug 738976 - java.lang.NullPointerException at org.mozilla.gecko.db.LocalBrowserDB.updateFaviconForUrl r=blassey

This commit is contained in:
Mark Finkle 2012-03-27 08:47:14 -04:00
parent db141ca533
commit 6f47a41cd7

View File

@ -593,6 +593,8 @@ public class LocalBrowserDB implements BrowserDB.BrowserDBIface {
public void updateFaviconForUrl(ContentResolver cr, String uri,
BitmapDrawable favicon) {
Bitmap bitmap = favicon.getBitmap();
if (bitmap == null)
return;
ByteArrayOutputStream stream = new ByteArrayOutputStream();
bitmap.compress(Bitmap.CompressFormat.PNG, 100, stream);