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
This commit is contained in:
Michael Gernoth 2007-03-07 15:48:08 +00:00
parent 3dcf92a96b
commit 75fd2e8047

View File

@ -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;
}