summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers/xdri/egl_xdri.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/egl/drivers/xdri/egl_xdri.c')
-rw-r--r--src/egl/drivers/xdri/egl_xdri.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/egl/drivers/xdri/egl_xdri.c b/src/egl/drivers/xdri/egl_xdri.c
index 83d4b86d98f..3b3e312746e 100644
--- a/src/egl/drivers/xdri/egl_xdri.c
+++ b/src/egl/drivers/xdri/egl_xdri.c
@@ -654,7 +654,10 @@ xdri_eglInitialize(_EGLDriver *drv, EGLDisplay dpy,
xdri_drv->Base.Initialized = EGL_TRUE;
- snprintf(name, sizeof(name), "X/DRI:%s", xdri_drv->dri_driver_name);
+ if (xdri_drv->dri_driver_name)
+ snprintf(name, sizeof(name), "X/DRI:%s", xdri_drv->dri_driver_name);
+ else
+ snprintf(name, sizeof(name), "X/DRI");
xdri_drv->Base.Name = name;
/* we're supporting EGL 1.4 */