Merge "frameworks/base/opengl: Add NULL check"
This commit is contained in:
@@ -843,10 +843,13 @@ EGLBoolean eglChooseConfig( EGLDisplay dpy, const EGLint *attrib_list,
|
|||||||
EGLint patch_index = -1;
|
EGLint patch_index = -1;
|
||||||
GLint attr;
|
GLint attr;
|
||||||
size_t size = 0;
|
size_t size = 0;
|
||||||
while ((attr=attrib_list[size]) != EGL_NONE) {
|
|
||||||
if (attr == EGL_CONFIG_ID)
|
if (attrib_list != NULL) {
|
||||||
patch_index = size;
|
while ((attr=attrib_list[size]) != EGL_NONE) {
|
||||||
size += 2;
|
if (attr == EGL_CONFIG_ID)
|
||||||
|
patch_index = size;
|
||||||
|
size += 2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (patch_index >= 0) {
|
if (patch_index >= 0) {
|
||||||
size += 2; // we need copy the sentinel as well
|
size += 2; // we need copy the sentinel as well
|
||||||
|
|||||||
Reference in New Issue
Block a user