From: Brian Paul Date: Fri, 20 Jun 2008 16:20:06 +0000 (-0600) Subject: egl: added null ptr check X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8a75d109531755358708de5381eb912b7e2bf69c;p=mesa.git egl: added null ptr check --- 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);