[gnome-shell] st: Bail out on clipboard requests if there is no text.
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] st: Bail out on clipboard requests if there is no text.
- Date: Fri, 10 Oct 2014 17:38:46 +0000 (UTC)
commit eaec459ee98e3b216a945f3198256036cfe927bb
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Oct 10 19:12:27 2014 +0200
st: Bail out on clipboard requests if there is no text.
If a selection request happens through foreign means, the selected
text is NULL, and a crash happens.
https://bugzilla.gnome.org/show_bug.cgi?id=738314
src/st/st-clipboard.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/st/st-clipboard.c b/src/st/st-clipboard.c
index a09360d..32da142 100644
--- a/src/st/st-clipboard.c
+++ b/src/st/st-clipboard.c
@@ -119,7 +119,8 @@ st_clipboard_provider (GdkXEvent *xevent_p,
XSelectionRequestEvent *req_event;
GdkDisplay *display = gdk_display_get_default ();
- if (xev->type != SelectionRequest)
+ if (xev->type != SelectionRequest ||
+ !clipboard->priv->clipboard_text)
return GDK_FILTER_CONTINUE;
req_event = &xev->xselectionrequest;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]