mirror of
https://github.com/tsukumijima/libmali-rockchip.git
synced 2026-01-24 00:10:50 +01:00
hook: Fix crash in eglChooseConfig() without attrs
The attrs might be NULL. Change-Id: If80c15f12f51cc739ee0177da97ac5ae8ec689d1 Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
This commit is contained in:
parent
751535b76d
commit
3c3843198e
1 changed files with 3 additions and 0 deletions
|
|
@ -786,6 +786,9 @@ EGLBoolean eglChooseConfig (EGLDisplay dpy, const EGLint *attrib_list, EGLConfig
|
|||
EGLint list[MAX_EGL_ATTRS];
|
||||
int i = 0;
|
||||
|
||||
if (!attrib_list)
|
||||
return _eglChooseConfig(dpy, attrib_list, configs, config_size, num_config);
|
||||
|
||||
while (attrib_list[i] != EGL_NONE) {
|
||||
if (i > MAX_EGL_ATTRS - 2)
|
||||
return EGL_FALSE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue