This fixes several NULL dereferences.
_eglLookupConfig(EGLConfig config, _EGLDisplay *dpy)
{
_EGLConfig *conf = (_EGLConfig *) config;
- if (!_eglCheckConfigHandle(config, dpy))
+ if (!dpy || !_eglCheckConfigHandle(config, dpy))
conf = NULL;
return conf;
}
{
EGLint scrnum;
- if (!disp->Screens)
+ if (!disp || !disp->Screens)
return NULL;
/* loop over all screens on the display */
{
EGLint i;
- if (!display->Screens)
+ if (!display || !display->Screens)
return NULL;
for (i = 0; i < display->Screens->Size; i++) {