GNOME Bugzilla – Bug 706893
Received a g_object_unref error using atspi_accessible_get_application
Last modified: 2013-08-27 16:30:22 UTC
Created attachment 253248 [details] Test with a basic atspi listener Using the C test attached I get the following message: "(process:31863): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed" I also see something similar executing a equivalent test written in python, but with a lot of python babblery. I have a patch that solves this problem. Note: probably it would be a good idea to include a test like this on at-spi2-core, as a example of how to use atspi API in C.
Created attachment 253252 [details] [review] Remove unneeded unref That unref is done inside an if with the next condition: if (!parent && obj->parent.app && atspi_accessible_get_role (obj, NULL) != ATSPI_ROLE_APPLICATION) as you can see, it checks parent. So inside the if, it will be NULL, so calling g_object_unref on it doesn't makes sense.
Comment on attachment 253252 [details] [review] Remove unneeded unref Good catch. Yeah, that looks fine.