diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2008-06-20 10:20:06 -0600 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2008-06-20 10:20:06 -0600 |
commit | 8a75d109531755358708de5381eb912b7e2bf69c (patch) | |
tree | f8cd59d5f5e478c05d969877137456c7c6de18bc /src/egl/main | |
parent | cae4444fa179c9ed556f1d1d207967b4e72736e2 (diff) | |
download | external_mesa3d-8a75d109531755358708de5381eb912b7e2bf69c.zip external_mesa3d-8a75d109531755358708de5381eb912b7e2bf69c.tar.gz external_mesa3d-8a75d109531755358708de5381eb912b7e2bf69c.tar.bz2 |
egl: added null ptr check
Diffstat (limited to 'src/egl/main')
-rw-r--r-- | src/egl/main/eglconfig.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/egl/main/eglconfig.c b/src/egl/main/eglconfig.c index 794a783..3ef0564 100644 --- a/src/egl/main/eglconfig.c +++ b/src/egl/main/eglconfig.c @@ -340,8 +340,10 @@ _eglChooseConfig(_EGLDriver *drv, EGLDisplay dpy, const EGLint *attrib_list, qsort(configList, count, sizeof(_EGLConfig *), _eglCompareConfigs); /* copy config handles to output array */ - for (i = 0; i < count; i++) { - configs[i] = configList[i]->Handle; + if (configs) { + for (i = 0; i < count; i++) { + configs[i] = configList[i]->Handle; + } } free(configList); |