[Spice-commits] src/spice-gtk-session.c
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Jan 11 11:06:14 UTC 2019
src/spice-gtk-session.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 84ea62de2e53b149f65e4d071fb5d70e121f6307
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date: Fri Jan 11 14:26:19 2019 +0400
gtk: don't request clipboard targets when there is no owner
After a clipboard-clear, the owner-changed signal is triggered, with
no owner. Let's avoid requesting for targets, that would lead to a
failure.
Fixes:
(lt-spicy:23226): GSpice-DEBUG: 13:36:38.741: spice-gtk-session.c:797 clipboard_clear
(lt-spicy:23226): GSpice-DEBUG: 13:36:38.742: spice-gtk-session.c:547 clipboard_get_targets:
(lt-spicy:23226): GSpice-DEBUG: 13:36:38.742: spice-gtk-session.c:555 Retrieving the clipboard data has failed
Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
Acked-by: Victor Toso <victortoso at redhat.com>
diff --git a/src/spice-gtk-session.c b/src/spice-gtk-session.c
index adc72a2..9d7702c 100644
--- a/src/spice-gtk-session.c
+++ b/src/spice-gtk-session.c
@@ -670,7 +670,8 @@ static void clipboard_owner_change(GtkClipboard *clipboard,
/* This situation happens when clipboard is being cleared by us, when agent
* sends a release-grab for instance */
- if (gtk_clipboard_get_owner(clipboard) == G_OBJECT(self)) {
+ GObject *owner = gtk_clipboard_get_owner(clipboard);
+ if (owner == NULL || owner == G_OBJECT(self)) {
return;
}
More information about the Spice-commits
mailing list