Mesa (master): egl/android: Check return value of dri2_get_dri_config()
Emil Velikov
evelikov at kemper.freedesktop.org
Wed Jul 20 15:15:49 UTC 2016
Module: Mesa
Branch: master
Commit: 94282b6dd0e7c15030b09b6789a7aa5a15e8a869
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=94282b6dd0e7c15030b09b6789a7aa5a15e8a869
Author: Tomasz Figa <tfiga at chromium.org>
Date: Fri Jul 15 16:53:48 2016 +0900
egl/android: Check return value of dri2_get_dri_config()
It might return NULL if specific config variant is unsupported.
Cc: "11.2 12.0" <mesa-stable at lists.freedesktop.org>
Signed-off-by: Tomasz Figa <tfiga at chromium.org>
Reviewed-by: Eric Anholt <eric at anholt.net>
Reviewed-by: Emil Velikov <emil.velikov at collabora.com>
---
src/egl/drivers/dri2/platform_android.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/egl/drivers/dri2/platform_android.c b/src/egl/drivers/dri2/platform_android.c
index b33f4e8..302eb85 100644
--- a/src/egl/drivers/dri2/platform_android.c
+++ b/src/egl/drivers/dri2/platform_android.c
@@ -280,6 +280,8 @@ droid_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
config = dri2_get_dri_config(dri2_conf, EGL_WINDOW_BIT,
dri2_surf->base.GLColorspace);
+ if (!config)
+ goto cleanup_surface;
dri2_surf->dri_drawable =
(*dri2_dpy->dri2->createNewDrawable)(dri2_dpy->dri_screen, config,
More information about the mesa-commit
mailing list