summaryrefslogtreecommitdiff
path: root/src/egl
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-06-20 10:20:06 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-06-20 10:20:06 -0600
commit8a75d109531755358708de5381eb912b7e2bf69c (patch)
treef8cd59d5f5e478c05d969877137456c7c6de18bc /src/egl
parentcae4444fa179c9ed556f1d1d207967b4e72736e2 (diff)
egl: added null ptr check
Diffstat (limited to 'src/egl')
-rw-r--r--src/egl/main/eglconfig.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/egl/main/eglconfig.c b/src/egl/main/eglconfig.c
index 794a783b9e..3ef0564a54 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);