[gtk/wip/ebassi/constraint-layout: 99/105] constraints solver: Avoid critials
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/ebassi/constraint-layout: 99/105] constraints solver: Avoid critials
- Date: Thu, 27 Jun 2019 16:39:14 +0000 (UTC)
commit f07ba4ac5b1911d56cf2bb4939cc2a434ac237c0
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Jun 27 01:43:47 2019 +0000
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.
gtk/gtkconstraintsolver.c | 1 +
1 file changed, 1 insertion(+)
---
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]