[libadwaita/wip/exalm/carousel-crash: 3/3] carousel: Check if the widget is a child in scroll_to_full()




commit 3f4e0d3ffc2a36c2f4edcbaf2fb0769e3165b91c
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Thu Sep 23 12:55:09 2021 +0500

    carousel: Check if the widget is a child in scroll_to_full()

 src/adw-carousel.c | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/src/adw-carousel.c b/src/adw-carousel.c
index 183bf22b..e41d761c 100644
--- a/src/adw-carousel.c
+++ b/src/adw-carousel.c
@@ -1385,6 +1385,7 @@ adw_carousel_scroll_to_full (AdwCarousel *self,
   g_return_if_fail (ADW_IS_CAROUSEL (self));
   g_return_if_fail (GTK_IS_WIDGET (widget));
   g_return_if_fail (duration >= 0);
+  g_return_if_fail (gtk_widget_get_parent (widget) == GTK_WIDGET (self));
 
   scroll_to (self, widget, duration);
 }


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