diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/x11/platform.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/client/x11/platform.cpp b/client/x11/platform.cpp index 910d61e8..fe98eae9 100644 --- a/client/x11/platform.cpp +++ b/client/x11/platform.cpp @@ -2575,8 +2575,12 @@ static int get_selection(XEvent &event, Atom type, Atom prop, int format, } len = clipboard_data_size; *data_ret = clipboard_data; - } else - *data_ret = data; + } else { + if (len > 0) + *data_ret = data; + else + *data_ret = NULL; + } if (len > 0) ret_val = len; |