[gnome-settings-daemon/gnome-2-32] Check whether XGetWindowProperty returns no items, and return if so.
- From: Rodrigo Moya <rodrigo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon/gnome-2-32] Check whether XGetWindowProperty returns no items, and return if so.
- Date: Wed, 15 Sep 2010 10:32:37 +0000 (UTC)
commit 98c4d34ec9fa8167702f079d255fdd4aba006597
Author: Krzysztof Klimonda <kklimonda ubuntu com>
Date: Wed Sep 15 12:32:16 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]