diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c index 137070318e..62d8f9d856 100644 --- a/gtk/gtkrange.c +++ b/gtk/gtkrange.c @@ -2006,8 +2006,8 @@ gtk_range_allocate_trough (GtkCssGadget *gadget, { GtkAllocation highlight_alloc, highlight_clip; - gtk_css_gadget_get_content_allocation (priv->slider_gadget, - &slider_alloc, NULL); + if (gtk_css_gadget_get_visible (priv->slider_gadget)) + gtk_css_gadget_get_content_allocation (priv->slider_gadget, &slider_alloc, NULL); highlight_alloc = *allocation; if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)