mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 19:50:11 +01:00
egl: Fix crashes in eglCreate*Surface()
Don't dereference a null EGLDisplay. Fixes tests dEQP-EGL.functional.negative_api.create_pbuffer_surface dEQP-EGL.functional.negative_api.create_pixmap_surface Reviewed-by: Mark Janes <mark.a.janes@intel.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=99038 Cc: "13.0" <mesa-stable@lists.freedesktop.org>
This commit is contained in:
parent
b18cd8ce2c
commit
5e97b8f5ce
1 changed files with 2 additions and 2 deletions
|
|
@ -856,7 +856,7 @@ _eglCreateWindowSurfaceCommon(_EGLDisplay *disp, EGLConfig config,
|
|||
RETURN_EGL_ERROR(disp, EGL_BAD_NATIVE_WINDOW, EGL_NO_SURFACE);
|
||||
|
||||
#ifdef HAVE_SURFACELESS_PLATFORM
|
||||
if (disp->Platform == _EGL_PLATFORM_SURFACELESS) {
|
||||
if (disp && disp->Platform == _EGL_PLATFORM_SURFACELESS) {
|
||||
/* From the EGL_MESA_platform_surfaceless spec (v1):
|
||||
*
|
||||
* eglCreatePlatformWindowSurface fails when called with a <display>
|
||||
|
|
@ -977,7 +977,7 @@ _eglCreatePixmapSurfaceCommon(_EGLDisplay *disp, EGLConfig config,
|
|||
EGLSurface ret;
|
||||
|
||||
#if HAVE_SURFACELESS_PLATFORM
|
||||
if (disp->Platform == _EGL_PLATFORM_SURFACELESS) {
|
||||
if (disp && disp->Platform == _EGL_PLATFORM_SURFACELESS) {
|
||||
/* From the EGL_MESA_platform_surfaceless spec (v1):
|
||||
*
|
||||
* [Like eglCreatePlatformWindowSurface,] eglCreatePlatformPixmapSurface
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue