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

Commit 20108bbe authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Fix nullpointer in updateContent"

parents f7b38dfe 0558e41d
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -192,16 +192,20 @@ public abstract class UploadedTexture extends BasicTexture {
            try {
                uploadToCanvas(canvas);
            } catch (RuntimeException e) {
                mContentValid = true;
                mContentValid = false;
                e.printStackTrace();
            }
        } else if (!mContentValid) {
            Bitmap bitmap = getBitmap();
            if (bitmap != null) {
                int format = GLUtils.getInternalFormat(bitmap);
                int type = GLUtils.getType(bitmap);
                canvas.texSubImage2D(this, mBorder, mBorder, bitmap, format, type);
                freeBitmap();
                mContentValid = true;
            } else {
                mContentValid = false;
            }
        }
    }