[test/xlib-surface-source] Skip test if DISPLAY not set

This commit is contained in:
Behdad Esfahbod 2008-08-11 14:28:00 -04:00
parent 5d307b58b9
commit bbd5f03fd8

View file

@ -61,6 +61,10 @@ create_source_surface (int size)
data = xmalloc (sizeof (struct closure));
data->dpy = XOpenDisplay (NULL);
if (!data->dpy) {
return NULL;
}
xrender_format = XRenderFindStandardFormat (data->dpy, PictStandardARGB32);
data->pix = XCreatePixmap (data->dpy, DefaultRootWindow (data->dpy),