GNOME Bugzilla – Bug 738147
StWidget: carefully clear ->accessible pointer to avoid resurrection
Last modified: 2014-10-13 16:47:49 UTC
The pointer to ->accessible was cleared too early in dispose, which resulted in another accessible object being created when the actor was removed from its parent in clutter_actor_dispose(). Use a weak reference instead to clear the ->accessible pointer.
Created attachment 288038 [details] [review] StWidget: carefully clear ->accessible pointer to avoid resurrection
Review of attachment 288038 [details] [review]: ::: src/st/st-widget.c @@ +2539,3 @@ + g_object_unref (widget->priv->accessible); + widget->priv->accessible = NULL; + } Doesn't this mean that if someone sets a custom accessible and then sets another, different, custom one, we'd try to remove a weak pointer that we never added? @@ +2543,2 @@ if (accessible) widget->priv->accessible = g_object_ref (accessible); i.e. I think we should add a weak pointer here too
Pushed with the added weakref. Thanks for the review, Rui. Attachment 288038 [details] pushed as 5e5035a - StWidget: carefully clear ->accessible pointer to avoid resurrection