widget: Unset widget on accessibles

This commit is contained in:
Benjamin Otte 2011-12-18 16:55:14 +01:00
parent 075cc5dd36
commit 23b5f9c066

View File

@ -10101,6 +10101,11 @@ gtk_widget_real_destroy (GtkWidget *object)
/* gtk_object_destroy() will already hold a refcount on object */
GtkWidget *widget = GTK_WIDGET (object);
GtkWidgetPrivate *priv = widget->priv;
GtkAccessible *accessible;
accessible = g_object_steal_qdata (G_OBJECT (widget), quark_accessible_object);
if (GTK_IS_ACCESSIBLE (accessible))
gtk_accessible_set_widget (accessible, NULL);
/* wipe accelerator closures (keep order) */
g_object_set_qdata (G_OBJECT (widget), quark_accel_path, NULL);