diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index b415ec7..cbf30e1 100644
--- a/gtk/gtkrange.c
+++ b/gtk/gtkrange.c
@@ -1844,13 +1844,14 @@ gtk_range_expose (GtkWidget      *widget,
 
       if (! trough_side_details)
         {
-          gtk_paint_box (widget->style,
-                         widget->window,
-                         sensitive ? GTK_STATE_ACTIVE : GTK_STATE_INSENSITIVE,
-                         GTK_SHADOW_IN,
-                         &area, GTK_WIDGET(range), "trough",
-                         x, y,
-                         width, height);
+          if (height > 0)
+            gtk_paint_box (widget->style,
+                           widget->window,
+                           sensitive ? GTK_STATE_ACTIVE : GTK_STATE_INSENSITIVE,
+                           GTK_SHADOW_IN,
+                           &area, GTK_WIDGET(range), "trough",
+                           x, y,
+                           width, height);
         }
       else
         {
