diff options
| author | Kristian Høgsberg <krh@redhat.com> | 2008-11-02 17:22:39 -0500 |
|---|---|---|
| committer | Kristian Høgsberg <krh@redhat.com> | 2008-11-06 10:53:02 -0500 |
| commit | 2a20d83fdb8a9513e3ced35712e62826eac431be (patch) | |
| tree | cb0cf27633c362d48f9108d673bd05cb460bddef /background.c | |
| parent | 6b5e7626f5458864726712cf7e49a70fa421f934 (diff) | |
Always poll on display fd so we only read when there's data.
Diffstat (limited to 'background.c')
| -rw-r--r-- | background.c | 4 |
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); |
