diff --git a/panels/user-accounts/cc-carousel.c b/panels/user-accounts/cc-carousel.c index c1311f7dc..cf98b533f 100644 --- a/panels/user-accounts/cc-carousel.c +++ b/panels/user-accounts/cc-carousel.c @@ -93,12 +93,13 @@ cc_carousel_item_get_x (CcCarouselItem *item, widget = GTK_WIDGET (item); width = gtk_widget_get_allocated_width (widget); - gtk_widget_translate_coordinates (widget, - parent, - width / 2, - 0, - &dest_x, - NULL); + if (!gtk_widget_translate_coordinates (widget, + parent, + width / 2, + 0, + &dest_x, + NULL)) + return 0; return CLAMP (dest_x - ARROW_SIZE, 0,