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

Commit 270d08d6 authored by Romain Guy's avatar Romain Guy Committed by Android Git Automerger
Browse files

am dd6d7841: Merge "Add extra error check when eglCreateContext fails Bug #7216919" into jb-mr1-dev

* commit 'dd6d7841':
  Add extra error check when eglCreateContext fails Bug #7216919
parents 91fc5461 dd6d7841
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -864,6 +864,12 @@ public abstract class HardwareRenderer {


            if (mEglContext == null) {
            if (mEglContext == null) {
                mEglContext = createContext(sEgl, sEglDisplay, sEglConfig);
                mEglContext = createContext(sEgl, sEglDisplay, sEglConfig);
                if (mEglContext == null) {
                    //noinspection ConstantConditions
                    throw new IllegalStateException("Could not create an EGL context. " +
                            "eglCreateContext failed with error: " +
                            GLUtils.getEGLErrorString(sEgl.eglGetError()));
                }
                sEglContextStorage.set(createManagedContext(mEglContext));
                sEglContextStorage.set(createManagedContext(mEglContext));
            }
            }
        }
        }