[libadwaita/wip/exalm/carousel-refactor] carousel: Check position in insert() and reorder()
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/carousel-refactor] carousel: Check position in insert() and reorder()
- Date: Fri, 30 Apr 2021 11:40:24 +0000 (UTC)
commit 398810168083c5e80d59c6ec9b97df4c9b2eb8b2
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Fri Apr 30 16:38:26 2021 +0500
carousel: Check position in insert() and reorder()
src/adw-carousel.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/src/adw-carousel.c b/src/adw-carousel.c
index 441d67f..ece1c5e 100644
--- a/src/adw-carousel.c
+++ b/src/adw-carousel.c
@@ -1237,6 +1237,7 @@ adw_carousel_insert (AdwCarousel *self,
g_return_if_fail (ADW_IS_CAROUSEL (self));
g_return_if_fail (GTK_IS_WIDGET (widget));
+ g_return_if_fail (position >= -1);
info = g_new0 (ChildInfo, 1);
info->widget = widget;
@@ -1281,6 +1282,7 @@ adw_carousel_reorder (AdwCarousel *self,
g_return_if_fail (ADW_IS_CAROUSEL (self));
g_return_if_fail (GTK_IS_WIDGET (child));
+ g_return_if_fail (position >= -1);
closest_point = get_closest_snap_point (self);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]