From daea9270f877e3f32ef93f71ffa2d27dac4162b4 Mon Sep 17 00:00:00 2001 From: Igor Oliveira Date: Sun, 24 Jan 2010 12:26:31 -0400 Subject: [PATCH] egl: check if driver_name is null --- src/gallium/state_trackers/egl/x11/native_x11.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/egl/x11/native_x11.c b/src/gallium/state_trackers/egl/x11/native_x11.c index 695ab88010b..dd3c9f8b6ac 100644 --- a/src/gallium/state_trackers/egl/x11/native_x11.c +++ b/src/gallium/state_trackers/egl/x11/native_x11.c @@ -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); -- 2.30.2