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

Commit 76288ca6 authored by Ahan Wu's avatar Ahan Wu Committed by Automerger Merge Worker
Browse files

DO NOT MERGE Prevent ImageWallpaper from keeping crashing am: a3bff94e am: 7c459fe3

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11700786

Change-Id: I6c0581c0c46314dab10d68a7a0d712b25438083e
parents 18b5a534 7c459fe3
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -603,7 +603,16 @@ public class ImageWallpaper extends WallpaperService {

            final FloatBuffer triangleVertices = createMesh(left, top, right, bottom);

            final int texture = loadTexture(mBackground);
            int texture = 0;
            try {
                texture = loadTexture(mBackground);
            } catch (IllegalArgumentException e) {
                mEgl.eglMakeCurrent(mEglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
                mEgl.eglDestroySurface(mEglDisplay, mEglSurface);
                mEgl.eglDestroyContext(mEglDisplay, mEglContext);
                mEgl.eglTerminate(mEglDisplay);
                return false;
            }
            final int program = buildProgram(sSimpleVS, sSimpleFS);

            final int attribPosition = glGetAttribLocation(program, "position");