commit | 0a23f355f2415dcd1ef98ad11a19a462b6bb32d3 | [log] [tgz] |
---|---|---|
author | Jason Macnak <[email protected]> | Sun Feb 25 08:30:01 2024 +0000 |
committer | Automerger Merge Worker <[email protected]> | Sun Feb 25 08:30:01 2024 +0000 |
tree | b2b1faca00d7c1d79225279c6a14773a62e564df | |
parent | e68f3193c4f593d088a8a80688754a3c0a608612 [diff] | |
parent | 132d6485b136eda10afe9266b95309c1f8ff6646 [diff] |
Check for egl->gbm before trying to use. am: 132d6485b1 Original change: https://android-review.googlesource.com/c/platform/external/virglrenderer/+/2975231 Change-Id: I86db68fbeb8ab14a235f746d173e9c4c9adf9534 Signed-off-by: Automerger Merge Worker <[email protected]>
diff --git a/src/vrend_winsys_egl.c b/src/vrend_winsys_egl.c index 4b38d5e..2c14dcf 100644 --- a/src/vrend_winsys_egl.c +++ b/src/vrend_winsys_egl.c
@@ -323,7 +323,9 @@ egl->egl_display = get_platform_display (EGL_PLATFORM_GBM_KHR, (EGLNativeDisplayType)egl->gbm->device, NULL); } else { - egl->egl_display = eglGetDisplay((EGLNativeDisplayType)egl->gbm->device); + if (egl->gbm && egl->gbm->device) { + egl->egl_display = eglGetDisplay((EGLNativeDisplayType)egl->gbm->device); + } } if (!egl->egl_display) {