[at-spi2-core/gi] Fix a couple of crashes introduced in the last commit
- From: Mike Gorse <mgorse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [at-spi2-core/gi] Fix a couple of crashes introduced in the last commit
- Date: Sun, 7 Nov 2010 18:12:28 +0000 (UTC)
commit d449052dd613701109ee9a6b7f46db8f92d7dce6
Author: Mike Gorse <mgorse novell com>
Date: Sun Nov 7 13:13:04 2010 -0500
Fix a couple of crashes introduced in the last commit
atspi/atspi-event-listener.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/atspi/atspi-event-listener.c b/atspi/atspi-event-listener.c
index 36dce89..9b0f8d2 100644
--- a/atspi/atspi-event-listener.c
+++ b/atspi/atspi-event-listener.c
@@ -558,7 +558,7 @@ _atspi_send_event (AtspiEvent *e)
(entry->name == NULL || !strcmp (name, entry->name)) &&
(entry->detail == NULL || !strcmp (detail, entry->detail)))
{
- entry->callback (entry->user_data, e);
+ entry->callback (e, entry->user_data);
}
}
if (detail) g_free (detail);
@@ -580,6 +580,8 @@ atspi_dbus_handle_event (DBusConnection *bus, DBusMessage *message, void *data)
dbus_int32_t detail1, detail2;
char *p;
+ memset (&e, 0, sizeof (e));
+
if (category)
{
category = g_utf8_strrchr (category, -1, '.');
@@ -627,6 +629,7 @@ atspi_dbus_handle_event (DBusConnection *bus, DBusMessage *message, void *data)
}
e.type = converted_type;
e.source = _atspi_ref_accessible (dbus_message_get_sender(message), dbus_message_get_path(message));
+
dbus_message_iter_recurse (&iter, &iter_variant);
switch (dbus_message_iter_get_arg_type (&iter_variant))
{
@@ -636,7 +639,7 @@ atspi_dbus_handle_event (DBusConnection *bus, DBusMessage *message, void *data)
if (demarshal_rect (&iter_variant, &rect))
{
g_value_init (&e.any, ATSPI_TYPE_RECT);
- g_value_set_instance (&e.any, &rect);
+ g_value_set_boxed (&e.any, &rect);
}
else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]