mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 07:10:15 +01:00
egl: Display may be NULL in _eglLookup*.
This fixes several NULL dereferences.
This commit is contained in:
parent
3ec296390c
commit
08a482e7a9
3 changed files with 3 additions and 3 deletions
|
|
@ -117,7 +117,7 @@ static INLINE _EGLConfig *
|
|||
_eglLookupConfig(EGLConfig config, _EGLDisplay *dpy)
|
||||
{
|
||||
_EGLConfig *conf = (_EGLConfig *) config;
|
||||
if (!_eglCheckConfigHandle(config, dpy))
|
||||
if (!dpy || !_eglCheckConfigHandle(config, dpy))
|
||||
conf = NULL;
|
||||
return conf;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ _eglLookupMode(EGLModeMESA mode, _EGLDisplay *disp)
|
|||
{
|
||||
EGLint scrnum;
|
||||
|
||||
if (!disp->Screens)
|
||||
if (!disp || !disp->Screens)
|
||||
return NULL;
|
||||
|
||||
/* loop over all screens on the display */
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ _eglLookupScreen(EGLScreenMESA screen, _EGLDisplay *display)
|
|||
{
|
||||
EGLint i;
|
||||
|
||||
if (!display->Screens)
|
||||
if (!display || !display->Screens)
|
||||
return NULL;
|
||||
|
||||
for (i = 0; i < display->Screens->Size; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue