[gtk/constraint-guide-3] Do not try to pivot after an optimization error



commit 7a190da5f4a06bc02c9979a525b82a9d4faf23c8
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Fri Jun 28 14:34:48 2019 +0100

    Do not try to pivot after an optimization error
    
    Bail out of the optimization, instead.

 gtk/gtkconstraintsolver.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkconstraintsolver.c b/gtk/gtkconstraintsolver.c
index ce25aca56e..1516a08675 100644
--- a/gtk/gtkconstraintsolver.c
+++ b/gtk/gtkconstraintsolver.c
@@ -1054,7 +1054,10 @@ gtk_constraint_solver_dual_optimize (GtkConstraintSolver *self)
         }
 
       if (ratio == DBL_MAX)
-        g_critical ("INTERNAL: ratio == DBL_MAX in dual_optimize");
+        {
+          g_critical ("INTERNAL: ratio == DBL_MAX in dual_optimize");
+          break;
+        }
 
       gtk_constraint_solver_pivot (self, entry_var, exit_var);
     }


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