From: Mike Gorse Date: Mon, 9 Jul 2012 00:35:36 +0000 (-0500) Subject: Fix abort on an error while removing a match rule X-Git-Tag: AT_SPI2_CORE_2_5_4~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4b3109052e2ef1e6606765c6086c557726602245;p=platform%2Fupstream%2Fat-spi2-core.git Fix abort on an error while removing a match rule --- diff --git a/atspi/atspi-event-listener.c b/atspi/atspi-event-listener.c index 753e094..781488e 100644 --- a/atspi/atspi-event-listener.c +++ b/atspi/atspi-event-listener.c @@ -701,12 +701,12 @@ atspi_event_listener_deregister_from_callback (AtspiEventListenerCB callback, l = g_list_remove (l, e); if (need_replace) event_listeners = l; - dbus_error_init (&d_error); - for (i = 0; i < matchrule_array->len; i++) - { - char *matchrule = g_ptr_array_index (matchrule_array, i); - dbus_bus_remove_match (_atspi_bus(), matchrule, &d_error); - } + for (i = 0; i < matchrule_array->len; i++) + { + char *matchrule = g_ptr_array_index (matchrule_array, i); + dbus_error_init (&d_error); + dbus_bus_remove_match (_atspi_bus(), matchrule, &d_error); + } dbus_error_init (&d_error); message = dbus_message_new_method_call (atspi_bus_registry, atspi_path_registry,