[clutter] cally: Fix up event listener registration minimally
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] cally: Fix up event listener registration minimally
- Date: Sun, 11 Sep 2011 14:59:02 +0000 (UTC)
commit 5781beb22daeb246316e9079025932b1799c6e2e
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Sep 10 20:25:15 2011 -0400
cally: Fix up event listener registration minimally
For god-knows-what reason, at-spi is trying various formats
of strings when registering listeners, triggering an ugly
(gnome-shell:4411): Clutter-WARNING **: invalid object type create
warning in .xsession-errors. Stop doing that.
Also don't leak temporary string arrays that are a side-effect
of passing parameters around as formatted strings.
https://bugzilla.gnome.org/show_bug.cgi?id=658721
clutter/cally/cally-util.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/clutter/cally/cally-util.c b/clutter/cally/cally-util.c
index 744e972..13ab9aa 100644
--- a/clutter/cally/cally-util.c
+++ b/clutter/cally/cally-util.c
@@ -183,7 +183,10 @@ cally_util_add_global_event_listener (GSignalEmissionHook listener,
split_string = g_strsplit (event_type, ":", 3);
- rc = add_listener (listener, split_string[1], split_string[2], event_type);
+ if (g_strv_length (split_string) == 3)
+ rc = add_listener (listener, split_string[1], split_string[2], event_type);
+
+ g_strfreev (split_string);
return rc;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]