Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c33bf55c authored by Jack Palevich's avatar Jack Palevich Committed by Android (Google) Code Review
Browse files

Merge "Throw an exception when trying to upload a recycled bitmap."

parents 23a8a459 5f89f510
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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");
        }