Bug 731483 - Fix NPE for thumbnails when Gecko is busy. r=blassey

This commit is contained in:
Brian Nicholson 2012-03-01 11:10:08 -08:00
parent df7308abde
commit 89bdffea29

View File

@ -455,10 +455,13 @@ public class GeckoAppShell
final int width, final int height) {
getHandler().post(new Runnable() {
public void run() {
final Tab tab = Tabs.getInstance().getTab(tabId);
if (tab == null)
return;
Bitmap b = Bitmap.createBitmap(width, height, Bitmap.Config.RGB_565);
b.copyPixelsFromBuffer(data);
freeDirectBuffer(data);
final Tab tab = Tabs.getInstance().getTab(tabId);
GeckoApp.mAppContext.processThumbnail(tab, b, null);
}
});