Index: gtk/gtkscrolledwindow.c
===================================================================
--- gtk/gtkscrolledwindow.c	(revision 21651)
+++ gtk/gtkscrolledwindow.c	(working copy)
@@ -1504,6 +1504,9 @@ gtk_scrolled_window_scroll_event (GtkWid
 
   if (event->direction == GDK_SCROLL_UP || event->direction == GDK_SCROLL_DOWN)
     range = GTK_SCROLLED_WINDOW (widget)->vscrollbar;
+    if (!range || !GTK_WIDGET_VISIBLE (range)) {
+    	range = GTK_SCROLLED_WINDOW (widget)->hscrollbar;
+    }
   else
     range = GTK_SCROLLED_WINDOW (widget)->hscrollbar;
 
