summaryrefslogtreecommitdiffstats
path: root/background.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2008-11-02 17:22:39 -0500
committerKristian Høgsberg <krh@redhat.com>2008-11-06 10:53:02 -0500
commit2a20d83fdb8a9513e3ced35712e62826eac431be (patch)
treecb0cf27633c362d48f9108d673bd05cb460bddef /background.c
parent6b5e7626f5458864726712cf7e49a70fa421f934 (diff)
Always poll on display fd so we only read when there's data.
Diffstat (limited to 'background.c')
-rw-r--r--background.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/background.c b/background.c
index 5c7775f..19748eb 100644
--- a/background.c
+++ b/background.c
@@ -126,6 +126,10 @@ int main(int argc, char *argv[])
display = wl_display_create(socket_name,
connection_update, &p[0]);
+ if (display == NULL) {
+ fprintf(stderr, "failed to create display: %m\n");
+ return -1;
+ }
p[0].fd = wl_display_get_fd(display);
surface = wl_display_create_surface(display);