GNOME Bugzilla – Bug 733610
g_object_unref exceptions using GtkNotebook
Last modified: 2014-07-25 08:06:44 UTC
HOW TO REPRODUCE: 1. Have any accessible tool (ie: Orca) running 2. Execute evince on a terminal to any pdf 3. You will get messages like this: (lt-evince:1366): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
Created attachment 281489 [details] [review] Unref selected item only if it is not NULL The accessible for each individual notebook page was asking to the notebook the selected page in order to check if that page should have the state SELECTED or not. After that check, it was unrefing the selected page. But the selection can be NULL. This patch just adds a NULL check, to avoid calling g_object_unref on it.
Review of attachment 281489 [details] [review]: looks generally good to me, but maybe you want to do something like: selected = ... if (selected) { if (selected == accessible) atk_state_set_add_state (...); g_object_unref (selected); }
Created attachment 281550 [details] [review] Unref selected item only if it is not NULL (v2) Updated patch based on Emmanuele Bassi review.
Review of attachment 281550 [details] [review]: ok