summaryrefslogtreecommitdiff
path: root/gtk/gtkselection.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2013-12-13 16:22:04 +0100
committerBenjamin Otte <otte@redhat.com>2013-12-13 19:07:42 +0100
commitd4c8f1028acf683303f3ff5ab5b351a3fa31f6e7 (patch)
treeee0b75fe1dd3ebcbe42fd350c38b0d2a3c21c287 /gtk/gtkselection.c
parentf123fe7fe710a8254ce9d13eefd64705cadc6920 (diff)
downloadgtk+-d4c8f1028acf683303f3ff5ab5b351a3fa31f6e7.tar.gz
clipboard: Don't crash when data is requested from NULL window
This could happen if data was requested from a separate screen now that multi-screen is no longer supported. Ideally, we'd want to support copying to other screens, but that requires solving in GDK as that's X-specific so cannot be well abstracted by GDK (without the reintroduction of multiple screens). https://bugzilla.gnome.org/show_bug.cgi?id=719314
Diffstat (limited to 'gtk/gtkselection.c')
-rw-r--r--gtk/gtkselection.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gtk/gtkselection.c b/gtk/gtkselection.c
index 84095c4216..e20d464b80 100644
--- a/gtk/gtkselection.c
+++ b/gtk/gtkselection.c
@@ -2294,6 +2294,9 @@ _gtk_selection_request (GtkWidget *widget,
int i;
gulong selection_max_size;
+ if (event->requestor == NULL)
+ return;
+
if (initialize)
gtk_selection_init ();