summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-09-26 11:17:09 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-09-26 20:51:13 -0600
commit7944efffff837e5945b2493392a05b87f431cc19 (patch)
treeedf6d26c2059cccdb419c37b043d671aabc55334
parentcce2ec2754cec6b407827717d01a5b3ad7fc5f6b (diff)
egl: check for null ptr/name
-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 9ff71588df..bb38513e7d 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 */