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




commit bf31d33b27dcd254d99524af59e462ff8dc9a507
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]