[Mesa-dev] [PATCH 1/2] egl/egldevice: Fix broken reference to dev->device without LIBDRM

Alexander von Gluck IV kallisti5 at unixzen.com
Thu Dec 27 20:41:46 UTC 2018


---
 src/egl/main/egldevice.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/egl/main/egldevice.c b/src/egl/main/egldevice.c
index 4878039be0..96042f4c5c 100644
--- a/src/egl/main/egldevice.c
+++ b/src/egl/main/egldevice.c
@@ -211,7 +211,11 @@ _eglDeviceSupports(_EGLDevice *dev, _EGLDeviceExtension ext)
 const char *
 _eglGetDRMDeviceRenderNode(_EGLDevice *dev)
 {
-   return dev->device->nodes[DRM_NODE_RENDER];
+   const char* result = NULL;
+#ifdef HAVE_LIBDRM
+   result = dev->device->nodes[DRM_NODE_RENDER];
+#endif
+   return result;
 }
 
 EGLBoolean
-- 
2.14.5



More information about the mesa-dev mailing list