Don't access event after freeing it

This commit is contained in:
Alexander Larsson 2008-12-09 13:35:46 +01:00 committed by Alexander Larsson
parent 1babb5400b
commit 5587130d48

View File

@ -7344,14 +7344,6 @@ _gdk_windowing_got_event (GdkDisplay *display,
unlink_event = proxy_button_event (pointer_window, x, y,
event);
if (unlink_event)
{
_gdk_event_queue_remove_link (display, event_link);
g_list_free_1 (event_link);
gdk_event_free (event);
}
/* Store last pointer window and position/state */
display->pointer_info.toplevel_x = x;
@ -7366,6 +7358,13 @@ _gdk_windowing_got_event (GdkDisplay *display,
if (pointer_window)
display->pointer_info.window_under_pointer = g_object_ref (pointer_window);
}
if (unlink_event)
{
_gdk_event_queue_remove_link (display, event_link);
g_list_free_1 (event_link);
gdk_event_free (event);
}
}
#define __GDK_WINDOW_C__