[gtk/wip/baedert/for-master: 101/101] stack: assert for some assumptions




commit 8a3c98f2c659d7bd832ce0e00690be214422757d
Author: Timm Bäder <mail baedert org>
Date:   Thu Oct 15 18:52:45 2020 +0200

    stack: assert for some assumptions

 gtk/gtkstack.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/gtk/gtkstack.c b/gtk/gtkstack.c
index 8fd95a39f1..79751d89ae 100644
--- a/gtk/gtkstack.c
+++ b/gtk/gtkstack.c
@@ -2112,6 +2112,9 @@ gtk_stack_snapshot_cube (GtkWidget   *widget,
   GtkStackPrivate *priv = gtk_stack_get_instance_private (stack);
   double progress = gtk_progress_tracker_get_progress (&priv->tracker, FALSE);
 
+  g_assert (priv->active_transition_type == GTK_STACK_TRANSITION_TYPE_ROTATE_RIGHT ||
+            priv->active_transition_type == GTK_STACK_TRANSITION_TYPE_ROTATE_LEFT);
+
   if (priv->active_transition_type == GTK_STACK_TRANSITION_TYPE_ROTATE_RIGHT)
     progress = 1 - progress;
 


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