aboutsummaryrefslogtreecommitdiffstats
path: root/src/window-commands.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/window-commands.c')
-rw-r--r--src/window-commands.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/window-commands.c b/src/window-commands.c
index bb2286848..5f5dea0d5 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -210,18 +210,21 @@ window_cmd_view_reload (GtkAction *action,
g_return_if_fail (embed != NULL);
event = gtk_get_current_event ();
- type = event->type;
-
- if (type == GDK_BUTTON_RELEASE)
- {
- state = event->button.state;
- }
- else if (type == GDK_KEY_RELEASE)
+ if (event)
{
- state = event->key.state;
- }
+ type = event->type;
+
+ if (type == GDK_BUTTON_RELEASE)
+ {
+ state = event->button.state;
+ }
+ else if (type == GDK_KEY_RELEASE)
+ {
+ state = event->key.state;
+ }
- gdk_event_free (event);
+ gdk_event_free (event);
+ }
if (state & GDK_SHIFT_MASK)
{