Don't try to unref event->dnd.context unconditionally.

As it's not set in gdk_event_new but eventually later.

https://bugzilla.gnome.org/show_bug.cgi?id=630520
This commit is contained in:
Tomeu Vizoso 2010-09-24 16:30:07 +02:00
parent 26c93dc04b
commit 41f4fd94df

View File

@ -540,7 +540,8 @@ gdk_event_free (GdkEvent *event)
case GDK_DRAG_STATUS:
case GDK_DROP_START:
case GDK_DROP_FINISHED:
g_object_unref (event->dnd.context);
if (event->dnd.context != NULL)
g_object_unref (event->dnd.context);
break;
case GDK_BUTTON_PRESS: