diff options
author | Brian Paul <[email protected]> | 2008-06-20 10:20:06 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2008-06-20 10:20:06 -0600 |
commit | 8a75d109531755358708de5381eb912b7e2bf69c (patch) | |
tree | f8cd59d5f5e478c05d969877137456c7c6de18bc | |
parent | cae4444fa179c9ed556f1d1d207967b4e72736e2 (diff) |
egl: added null ptr check
-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 794a783b9e2..3ef0564a548 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); |