From: Brian Paul Date: Fri, 20 Jun 2008 16:20:06 +0000 (-0600) Subject: egl: added null ptr check X-Git-Tag: 062012170305~17580^2~390^2~1161 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8a75d109531755358708de5381eb912b7e2bf69c;p=profile%2Fivi%2Fmesa.git egl: added null ptr check --- 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);