From 44728d09a9775a7e786a3d39ab0d98076ea4c0c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 15 Oct 2020 18:52:45 +0200 Subject: [PATCH] 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 b97ebb54bb..cafa2a263b 100644 --- a/gtk/gtkstack.c +++ b/gtk/gtkstack.c @@ -2166,6 +2166,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;