]> spindle.queued.net Git - midori/commitdiff
Ensure we have a window in _action_reload_stop_activate
authorChristian Dywan <christian@twotoasts.de>
Sat, 25 Feb 2012 23:02:59 +0000 (00:02 +0100)
committerChristian Dywan <christian@twotoasts.de>
Sat, 25 Feb 2012 23:03:15 +0000 (00:03 +0100)
midori/midori-browser.c

index 9d0689afb51c8a9363279676e28464f46a5e5993..a121689f9a8282eb200c13d98a0bdcfa1264f3ba 100644 (file)
@@ -3284,13 +3284,14 @@ _action_reload_stop_activate (GtkAction*     action,
     {
         GdkModifierType state = (GdkModifierType)0;
         gint x, y;
+        GdkWindow* window;
         gboolean from_cache = TRUE;
 
         if (!strcmp (gtk_action_get_name (action), "ReloadUncached"))
             from_cache = FALSE;
-        else
+        else if ((window = gtk_widget_get_window (GTK_WIDGET (browser))))
         {
-            gdk_window_get_pointer (NULL, &x, &y, &state);
+            gdk_window_get_pointer (window, &x, &y, &state);
             if (state & GDK_SHIFT_MASK)
                 from_cache = FALSE;
         }