diff options
author | Mike Gorse <mgorse@novell.com> | 2012-02-19 16:23:42 -0600 |
---|---|---|
committer | Mike Gorse <mgorse@novell.com> | 2012-02-19 16:23:42 -0600 |
commit | 959ad9c7e3fbba7aee2dcd93043eea6b5105f95f (patch) | |
tree | 37fbc212dd1369a107796325cdcc823b0b714092 /atspi/atspi-event-listener.c | |
parent | c5ae7c1b45f9a7156d3a7b5e78c55c7e46ef2ad9 (diff) | |
download | at-spi2-core-959ad9c7e3fbba7aee2dcd93043eea6b5105f95f.tar.gz |
Don't g_object_unref a NULL object for event variant
If we get an event with what appears to be an accessible as the variant
but we do not succeed in marshalling the accessible (possibly because it
is the null path), do not unref the null object. Stops a glib warning.
Diffstat (limited to 'atspi/atspi-event-listener.c')
-rw-r--r-- | atspi/atspi-event-listener.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/atspi/atspi-event-listener.c b/atspi/atspi-event-listener.c index b397d6fe..4581f827 100644 --- a/atspi/atspi-event-listener.c +++ b/atspi/atspi-event-listener.c @@ -907,7 +907,8 @@ _atspi_dbus_handle_event (DBusConnection *bus, DBusMessage *message, void *data) accessible = _atspi_dbus_return_accessible_from_iter (&iter_variant); g_value_init (&e.any_data, ATSPI_TYPE_ACCESSIBLE); g_value_set_instance (&e.any_data, accessible); - g_object_unref (accessible); /* value now owns it */ + if (accessible) + g_object_unref (accessible); /* value now owns it */ } break; } |