diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2008-09-26 11:17:09 -0600 |
---|---|---|
committer | Zack Rusin <zack@tungstengraphics.com> | 2008-10-02 10:19:46 -0400 |
commit | 2cb213ff233ccd566e716aece45da78daa7d015a (patch) | |
tree | 4a5cb37c516e7fd67c682907d8b0c64067ce6049 /src/egl/drivers | |
parent | 5b60d6d07b79124499a1d75a2830cf2e5949d1ad (diff) |
egl: check for null ptr/name
Diffstat (limited to 'src/egl/drivers')
-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 83d4b86d98..3b3e312746 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 */ |