forked from AuroraMiddleware/gtk
container: don't leak the focus_child ref count
gtk_conatiner_set_focus_child() takes a ref. Release the ref in _destroy(). Fixes #414712.
This commit is contained in:
parent
9688665334
commit
b00b1c33a3
@ -1078,6 +1078,12 @@ gtk_container_destroy (GtkObject *object)
|
||||
if (GTK_CONTAINER_RESIZE_PENDING (container))
|
||||
_gtk_container_dequeue_resize_handler (container);
|
||||
|
||||
if (container->focus_child)
|
||||
{
|
||||
g_object_unref (container->focus_child);
|
||||
container->focus_child = NULL;
|
||||
}
|
||||
|
||||
/* do this before walking child widgets, to avoid
|
||||
* removing children from focus chain one by one.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user