From 5781beb22daeb246316e9079025932b1799c6e2e Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 10 Sep 2011 20:25:15 -0400 Subject: [PATCH] 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 file changed, 4 insertions(+), 1 deletion(-) 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; } -- 2.7.4