From ab11bad54707941eb41be62c025b983760ce3900 Mon Sep 17 00:00:00 2001 From: Dodji Seketeli Date: Thu, 4 Oct 2007 13:05:29 +0200 Subject: [PATCH] Xephyr: remove a potential crasher * hw/kdrive/ephyr/hostx.c: (hostx_has_dri): be more defensive. --- hw/kdrive/ephyr/hostx.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c index 181edd226..b5ffdd075 100644 --- a/hw/kdrive/ephyr/hostx.c +++ b/hw/kdrive/ephyr/hostx.c @@ -1328,6 +1328,9 @@ hostx_has_dri (void) int event_base=0, error_base=0 ; Display *dpy=hostx_get_display () ; + if (!dpy) + return FALSE ; + if (!XF86DRIQueryExtension (dpy, &event_base, &error_base)) {