From 8a75d109531755358708de5381eb912b7e2bf69c Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 20 Jun 2008 10:20:06 -0600 Subject: [PATCH] egl: added null ptr check --- src/egl/main/eglconfig.c | 6 ++++-- 1 file 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); -- 2.30.2