From 11e374ce134eaa602069bb5a42088641e2537718 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 11 Aug 2015 15:27:00 -0400 Subject: [PATCH] only create fd handler for wl clipboard data source if fd is passed --- src/bin/e_comp_wl_data.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/bin/e_comp_wl_data.c b/src/bin/e_comp_wl_data.c index 9831d5202..3c2ad61a7 100644 --- a/src/bin/e_comp_wl_data.c +++ b/src/bin/e_comp_wl_data.c @@ -890,11 +890,14 @@ e_comp_wl_clipboard_source_create(const char *mime_type, uint32_t serial, int fd eina_list_append(source->data_source.mime_types, eina_stringshare_add(mime_type)); - source->fd_handler = - ecore_main_fd_handler_add(fd, ECORE_FD_READ, - _e_comp_wl_clipboard_source_save, - e_comp->wl_comp_data, NULL, NULL); - if (!source->fd_handler) return NULL; + if (fd > 0) + { + source->fd_handler = + ecore_main_fd_handler_add(fd, ECORE_FD_READ, + _e_comp_wl_clipboard_source_save, + e_comp->wl_comp_data, NULL, NULL); + if (!source->fd_handler) return NULL; + } source->fd = fd;