[libhandy/wip/exalm/oops: 2/2] carousel: Null-check tracker before shifting position



commit aec62e98bd25ebcd1edb34533adb706f1efaf060
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Fri May 29 01:59:21 2020 +0500

    carousel: Null-check tracker before shifting position
    
    The tracker is destroyed before the carousel box children, so the last
    signal emissions happen when it's already null.
    
    Signed-off-by: Alexander Mikhaylenko <alexm gnome org>

 src/hdy-carousel.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/hdy-carousel.c b/src/hdy-carousel.c
index 759e1827..147c9982 100644
--- a/src/hdy-carousel.c
+++ b/src/hdy-carousel.c
@@ -304,7 +304,8 @@ position_shifted_cb (HdyCarousel    *self,
                      gdouble         delta,
                      HdyCarouselBox *box)
 {
-  hdy_swipe_tracker_shift_position (self->tracker, delta);
+  if (self->tracker)
+    hdy_swipe_tracker_shift_position (self->tracker, delta);
 }
 
 static GdkRGBA


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