diff --git src/gtk/window.cpp src/gtk/window.cpp
index 8f41635..a167434 100644
--- src/gtk/window.cpp
+++ src/gtk/window.cpp
@@ -1723,6 +1723,9 @@ scroll_event(GtkWidget* widget, GdkEventScroll* gdk_event, wxWindow* win)
 
     if (!win->GTKProcessEvent(event))
     {
+        if (!range)
+            return false;
+
         if (direction == GDK_SCROLL_UP || direction == GDK_SCROLL_LEFT)
             step = -step;
         AdjustRangeValue(range, step);
