[gnome-settings-daemon/gnome-2-30] Check whether XGetWindowProperty returns no items, and return if so.
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon/gnome-2-30] Check whether XGetWindowProperty returns no items, and return if so.
- Date: Thu, 23 Sep 2010 16:34:24 +0000 (UTC)
commit b7a9fd528253af16456cf7c0dc1f48bfd0dcbfbc
Author: Krzysztof Klimonda <kklimonda ubuntu com>
Date: Wed Sep 15 12:29:17 2010 +0200
Check whether XGetWindowProperty returns no items, and return if so.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=628526
plugins/clipboard/gsd-clipboard-manager.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/plugins/clipboard/gsd-clipboard-manager.c b/plugins/clipboard/gsd-clipboard-manager.c
index f8cb7ec..d0d28c3 100644
--- a/plugins/clipboard/gsd-clipboard-manager.c
+++ b/plugins/clipboard/gsd-clipboard-manager.c
@@ -599,8 +599,11 @@ convert_clipboard (GsdClipboardManager *manager,
&type, &format, &nitems, &remaining,
(unsigned char **) &multiple);
- if (type != XA_ATOM_PAIR)
+ if (type != XA_ATOM_PAIR || nitems == 0) {
+ if (multiple)
+ free (multiple);
return;
+ }
for (i = 0; i < nitems; i += 2) {
rdata = (IncrConversion *) malloc (sizeof (IncrConversion));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]