egl: check if driver_name is null
authorIgor Oliveira <igor.oliveira@openbossa.org>
Sun, 24 Jan 2010 16:26:31 +0000 (12:26 -0400)
committerChia-I Wu <olvaffe@gmail.com>
Mon, 25 Jan 2010 02:30:51 +0000 (10:30 +0800)
src/gallium/state_trackers/egl/x11/native_x11.c

index 695ab88..dd3c9f8 100644 (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);