Merge "Throw OOME if Bitmap.nativeCreate fails" into oc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
c4049e247f
@@ -743,6 +743,8 @@ static jobject Bitmap_creator(JNIEnv* env, jobject, jintArray jColors,
|
|||||||
|
|
||||||
sk_sp<Bitmap> nativeBitmap = Bitmap::allocateHeapBitmap(&bitmap, NULL);
|
sk_sp<Bitmap> nativeBitmap = Bitmap::allocateHeapBitmap(&bitmap, NULL);
|
||||||
if (!nativeBitmap) {
|
if (!nativeBitmap) {
|
||||||
|
ALOGE("OOM allocating Bitmap with dimensions %i x %i", width, height);
|
||||||
|
doThrowOOME(env);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user