From 75fd2e80473e8ae348620c6c64c31157b3af5b02 Mon Sep 17 00:00:00 2001 From: Michael Gernoth Date: Wed, 7 Mar 2007 15:48:08 +0000 Subject: [PATCH] check if there is any data returned from XGetWindowProperty before calling xclip_send_data_with_convert. git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1398 423420c4-83ab-492f-b58f-81f9feb106b5 --- xclip.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/xclip.c b/xclip.c index d4450a0..b7c19c4 100644 --- a/xclip.c +++ b/xclip.c @@ -289,9 +289,6 @@ xclip_send_data_with_convert(uint8 * source, size_t source_size, Atom target) DEBUG_CLIPBOARD(("xclip_send_data_with_convert: target=%s, size=%u\n", XGetAtomName(g_display, target), (unsigned) source_size)); - if ((!source) || source_size == 0) - return False; - #ifdef USE_UNICODE_CLIPBOARD if (target == format_string_atom || target == format_unicode_atom || target == format_utf8_string_atom) @@ -716,7 +713,7 @@ xclip_handle_SelectionNotify(XSelectionEvent * event) rdesktop_is_selection_owner = True; cliprdr_send_native_format_announce(data, nitems); } - else if (!xclip_send_data_with_convert(data, nitems, event->target)) + else if ((!nitems) || (!xclip_send_data_with_convert(data, nitems, event->target))) { goto fail; }