[gtk/wip/ebassi/constraint-layout: 98/105] constraint solver: Fix thawing



commit 391add73ecc6ce5bc318ab51627e6056564611b2
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Jun 26 20:08:08 2019 +0000

    constraint solver: Fix thawing
    
    There was an obviously wrong precondition here.

 gtk/gtkconstraintsolver.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkconstraintsolver.c b/gtk/gtkconstraintsolver.c
index 53262b70af..0441ca5e95 100644
--- a/gtk/gtkconstraintsolver.c
+++ b/gtk/gtkconstraintsolver.c
@@ -741,6 +741,10 @@ gtk_constraint_solver_optimize (GtkConstraintSolver *self,
     str = gtk_constraint_variable_to_string (z);
     g_debug ("optimize: %s\n", str);
     g_free (str);
+
+    str = gtk_constraint_solver_to_string (self);
+    g_debug ("%s\n", str);
+    g_free (str);
   }
 #endif
 
@@ -1404,7 +1408,7 @@ void
 gtk_constraint_solver_thaw (GtkConstraintSolver *solver)
 {
   g_return_if_fail (GTK_IS_CONSTRAINT_SOLVER (solver));
-  g_return_if_fail (solver->freeze_count == 0);
+  g_return_if_fail (solver->freeze_count > 0);
 
   solver->freeze_count -= 1;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]