[Mesa-dev] [PATCH] From List: Check if the window is non-NULL before setting swap interval.
Mohammad, Sami Uddin
sami.uddin.mohammad at intel.com
Mon Jul 2 09:19:44 UTC 2018
Please ignore this patch.
New patch at: https://lists.freedesktop.org/archives/mesa-dev/2018-July/199103.html
-----Original Message-----
From: Mohammad, Sami Uddin
Sent: Monday, July 2, 2018 10:16 AM
To: mesa-dev at lists.freedesktop.org
Cc: eric at engestrom.ch; emil.velikov at collabora.com; Kondapally, Kalyan <kalyan.kondapally at intel.com>; Kps, Harish Krupo <harish.krupo.kps at intel.com>; Mohammad, Sami Uddin <sami.uddin.mohammad at intel.com>
Subject: [PATCH] From List: Check if the window is non-NULL before setting swap interval.
This fixes crash due to NULL window when swap interval is set for pbuffer surface.
Jira: 61995
Test: CtsDisplayTestCases pass
Signed-off-by: samiuddi <sami.uddin.mohammad at intel.com>
---
src/egl/drivers/dri2/platform_android.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/egl/drivers/dri2/platform_android.c b/src/egl/drivers/dri2/platform_android.c
index ca8708a..b5b960a 100644
--- a/src/egl/drivers/dri2/platform_android.c
+++ b/src/egl/drivers/dri2/platform_android.c
@@ -485,7 +485,7 @@ droid_swap_interval(_EGLDriver *drv, _EGLDisplay *dpy,
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surf);
struct ANativeWindow *window = dri2_surf->window;
- if (window->setSwapInterval(window, interval))
+ if (window && window->setSwapInterval(window, interval))
return EGL_FALSE;
surf->SwapInterval = interval;
--
2.7.4
More information about the mesa-dev
mailing list