egl: check if driver_name is null

This commit is contained in:
Igor Oliveira 2010-01-24 12:26:31 -04:00 committed by Chia-I Wu
parent 9e1550dbaf
commit daea9270f8
1 changed files with 2 additions and 1 deletions

View File

@ -70,7 +70,8 @@ native_create_probe(EGLNativeDisplayType dpy)
if (xscr) {
if (x11_screen_support(xscr, X11_SCREEN_EXTENSION_DRI2)) {
driver_name = x11_screen_probe_dri2(xscr);
nprobe->data = strdup(driver_name);
if (driver_name)
nprobe->data = strdup(driver_name);
}
x11_screen_destroy(xscr);