From: Victor Toso <>

As manual states below, text could be NULL for different reasons and
we should handle that. I've included a debug message to help
identifying possible regressions in wayland.

 "The text parameter to callback will contain the resulting text if
 the request succeeded, or NULL if it failed. This could happen for
 various reasons, in particular if the clipboard was empty or if the
 contents of the clipboard could not be converted into text form."

Resolves: rhbz#1384676

Signed-off-by: Victor Toso <>
 src/spice-gtk-session.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/spice-gtk-session.c b/src/spice-gtk-session.c
index 3ff4e9a..c08483c 100644
--- a/src/spice-gtk-session.c
+++ b/src/spice-gtk-session.c
@@ -945,6 +945,11 @@ static void clipboard_received_text_cb(GtkClipboard 
     if (self == NULL)
+    if (text == NULL) {
+        SPICE_DEBUG ("Failed to retrieve clipboard text");
+        return;
+    }
     selection = get_selection_from_clipboard(self->priv, clipboard);

Spice-devel mailing list

Reply via email to