Merge "Throw an exception when trying to upload a recycled bitmap."
This commit is contained in:
committed by
Android (Google) Code Review
commit
c33bf55c09
@@ -142,6 +142,9 @@ public final class GLUtils {
|
||||
if (bitmap == null) {
|
||||
throw new NullPointerException("texImage2D can't be used with a null Bitmap");
|
||||
}
|
||||
if (bitmap.isRecycled()) {
|
||||
throw new IllegalArgumentException("bitmap is recycled");
|
||||
}
|
||||
if (native_texImage2D(target, level, -1, bitmap, -1, border)!=0) {
|
||||
throw new IllegalArgumentException("invalid Bitmap format");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user