From: Mark Doffman Date: Wed, 3 Feb 2010 09:15:42 +0000 (-0800) Subject: Fix issue where we would attempt to reference null objects X-Git-Tag: AT_SPI2_ATK_0_1_6~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f84b9301c551d4f828cb474fe9e55e33c08e71e6;p=platform%2Fupstream%2Fat-spi2-atk.git Fix issue where we would attempt to reference null objects on the child-changed removed signal. --- diff --git a/atk-adaptor/event.c b/atk-adaptor/event.c index 9930d2c..23133cb 100644 --- a/atk-adaptor/event.c +++ b/atk-adaptor/event.c @@ -602,7 +602,6 @@ active_descendant_event_listener (GSignalInvocationHint * signal_hint, AtkObject *child; GSignalQuery signal_query; const gchar *name, *minor; - gchar *s; gint detail1; g_signal_query (signal_hint->signal_id, &signal_query); @@ -617,7 +616,6 @@ active_descendant_event_listener (GSignalInvocationHint * signal_hint, emit_event (accessible, ITF_EVENT_OBJECT, name, "", detail1, 0, "(so)", child, append_object); - g_free (s); return TRUE; } @@ -746,7 +744,7 @@ children_changed_event_listener (GSignalInvocationHint * signal_hint, const gchar *name, *minor; gint detail1, detail2 = 0; - AtkObject *accessible, *ao; + AtkObject *accessible, *ao=NULL; gpointer child; g_signal_query (signal_hint->signal_id, &signal_query); diff --git a/atk-adaptor/object.c b/atk-adaptor/object.c index beeada4..090ee6a 100644 --- a/atk-adaptor/object.c +++ b/atk-adaptor/object.c @@ -80,6 +80,9 @@ spi_object_append_reference (DBusMessageIter * iter, AtkObject * obj) const gchar *name; gchar *path; + if (!obj) + return spi_object_append_null_reference (iter); + maybe_lease (obj); name = dbus_bus_get_unique_name (spi_global_app_data->bus);