diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2008-09-26 11:17:09 -0600 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2008-09-26 20:51:13 -0600 |
commit | 7944efffff837e5945b2493392a05b87f431cc19 (patch) | |
tree | edf6d26c2059cccdb419c37b043d671aabc55334 | |
parent | cce2ec2754cec6b407827717d01a5b3ad7fc5f6b (diff) |
egl: check for null ptr/name
-rw-r--r-- | src/egl/drivers/xdri/egl_xdri.c | 5 |
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 */ |