From: Christian Dywan Date: Sat, 25 Feb 2012 23:02:59 +0000 (+0100) Subject: Ensure we have a window in _action_reload_stop_activate X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=61af41340712734c9ddc263d8ef33c2b264d26f3;p=midori Ensure we have a window in _action_reload_stop_activate --- diff --git a/midori/midori-browser.c b/midori/midori-browser.c index 9d0689af..a121689f 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -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; }