summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2019-06-27 01:43:47 +0000
committerEmmanuele Bassi <ebassi@gnome.org>2019-06-27 17:38:02 +0100
commitf07ba4ac5b1911d56cf2bb4939cc2a434ac237c0 (patch)
tree22cc15d1e396638309dcf055cdbf56c32e73cdd9
parent391add73ecc6ce5bc318ab51627e6056564611b2 (diff)
downloadgtk+-f07ba4ac5b1911d56cf2bb4939cc2a434ac237c0.tar.gz
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.
-rw-r--r--gtk/gtkconstraintsolver.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gtk/gtkconstraintsolver.c b/gtk/gtkconstraintsolver.c
index 0441ca5e95..22fa0111a4 100644
--- a/gtk/gtkconstraintsolver.c
+++ b/gtk/gtkconstraintsolver.c
@@ -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);