mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 10:50:10 +00:00
Fix an ordering issue in event destruction
gdk_event_get_display accesses event->any.window, so don't free that window first thing.
This commit is contained in:
parent
18a2a6a90e
commit
1a3bdefb00
@ -740,9 +740,6 @@ gdk_event_free (GdkEvent *event)
|
||||
|
||||
g_return_if_fail (event != NULL);
|
||||
|
||||
if (event->any.window)
|
||||
g_object_unref (event->any.window);
|
||||
|
||||
switch (event->any.type)
|
||||
{
|
||||
case GDK_KEY_PRESS:
|
||||
@ -814,6 +811,9 @@ gdk_event_free (GdkEvent *event)
|
||||
if (display)
|
||||
_gdk_display_event_data_free (display, event);
|
||||
|
||||
if (event->any.window)
|
||||
g_object_unref (event->any.window);
|
||||
|
||||
g_hash_table_remove (event_hash, event);
|
||||
g_slice_free (GdkEventPrivate, (GdkEventPrivate*) event);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user