From 2661541740d93a6b48f658594288c94f7577548c Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Mon, 27 Mar 2006 11:10:09 +0000 Subject: [PATCH] Handle when server doesn't give us any clipboard data. git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1208 423420c4-83ab-492f-b58f-81f9feb106b5 --- xclip.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/xclip.c b/xclip.c index 4595eaa..c6ad207 100644 --- a/xclip.c +++ b/xclip.c @@ -821,6 +821,13 @@ ui_clip_handle_data(uint8 * data, uint32 length) { BOOL free_data = False; + if (length == 0) + { + xclip_refuse_selection(&selection_request); + has_selection_request = False; + return; + } + if (selection_request.target == format_string_atom || selection_request.target == XA_STRING) { /* We're expecting a CF_TEXT response */