| Index: ui/gfx/android/java_bitmap.cc
|
| diff --git a/ui/gfx/android/java_bitmap.cc b/ui/gfx/android/java_bitmap.cc
|
| index 0f6f2ea06e1f02348abc71dbe6a3d4a1eab8190d..d1f644f4a4f67833bbca9cae15f811599886c7d6 100644
|
| --- a/ui/gfx/android/java_bitmap.cc
|
| +++ b/ui/gfx/android/java_bitmap.cc
|
| @@ -117,9 +117,12 @@
|
| gfx::Size src_size = jbitmap.size();
|
|
|
| SkBitmap skbitmap;
|
| - skbitmap.allocPixels(SkImageInfo::MakeN32Premul(src_size.width(),
|
| - src_size.height()),
|
| - jbitmap.stride());
|
| + if (!skbitmap.allocPixels(SkImageInfo::MakeN32Premul(src_size.width(),
|
| + src_size.height()),
|
| + jbitmap.stride())) {
|
| + LOG(FATAL) << " Failed to allocate bitmap of size " << src_size.width()
|
| + << "x" << src_size.height() << " stride=" << jbitmap.stride();
|
| + }
|
| const void* src_pixels = jbitmap.pixels();
|
| void* dst_pixels = skbitmap.getPixels();
|
| memcpy(dst_pixels, src_pixels, skbitmap.getSize());
|
|
|