[Mesa-dev] [PATCH] Don't set swap interval for PBuffer surface. This fixes crash due to NULL window.

samiuddi sami.uddin.mohammad at intel.com
Fri Apr 27 09:17:59 UTC 2018


Test: CtsDisplayTestCases pass

Signed-off-by: samiuddi <sami.uddin.mohammad at intel.com>
---
 src/egl/drivers/dri2/platform_android.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/egl/drivers/dri2/platform_android.c b/src/egl/drivers/dri2/platform_android.c
index 976dd10..5048830 100644
--- a/src/egl/drivers/dri2/platform_android.c
+++ b/src/egl/drivers/dri2/platform_android.c
@@ -480,6 +480,9 @@ static EGLBoolean
 droid_swap_interval(_EGLDriver *drv, _EGLDisplay *dpy,
                    _EGLSurface *surf, EGLint interval)
 {
+   if (surf->Type == EGL_PBUFFER_BIT)
+      return EGL_FALSE;
+
    struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surf);
    struct ANativeWindow *window = dri2_surf->window;
 
-- 
2.7.4



More information about the mesa-dev mailing list