summaryrefslogtreecommitdiff
path: root/test/xlib-surface-source.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2008-08-11 14:28:00 -0400
committerBehdad Esfahbod <behdad@behdad.org>2008-08-11 14:28:28 -0400
commitbbd5f03fd8b04b92c9f8f06a386894d88650c0b4 (patch)
tree0e2b6550feb95707c91afcebd78888d79f1ec3e7 /test/xlib-surface-source.c
parent5d307b58b9a056ee866ea56305900f2eaa88441a (diff)
[test/xlib-surface-source] Skip test if DISPLAY not set
Diffstat (limited to 'test/xlib-surface-source.c')
-rw-r--r--test/xlib-surface-source.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/xlib-surface-source.c b/test/xlib-surface-source.c
index 192dadc6c..3c3351632 100644
--- a/test/xlib-surface-source.c
+++ b/test/xlib-surface-source.c
@@ -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),