[libadwaita/wip/exalm/carousel-refactor: 43/43] carousel: Check position in insert() and reorder()
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/carousel-refactor: 43/43] carousel: Check position in insert() and reorder()
- Date: Thu, 6 May 2021 10:10:04 +0000 (UTC)
commit 1bd5b42d98507cc9a5c0a73e3d5b687a6f1d2a8a
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]