constraints solver: Avoid critials

When the solver is finalized with existing
constraints, we end up with criticals when
the constraints ref finalize code calls
back into the hash table. Avoid that by
emptying the hash table beforehand.
This commit is contained in:
Matthias Clasen
2019-06-27 01:43:47 +00:00
committed by Emmanuele Bassi
parent 391add73ec
commit f07ba4ac5b

View File

@@ -265,6 +265,7 @@ gtk_constraint_solver_finalize (GObject *gobject)
{
GtkConstraintSolver *self = GTK_CONSTRAINT_SOLVER (gobject);
g_hash_table_remove_all (self->constraints);
g_clear_pointer (&self->constraints, g_hash_table_unref);
g_clear_pointer (&self->stay_error_vars, g_ptr_array_unref);