diff --git a/gdk/gdkevents.c b/gdk/gdkevents.c index 053e6d5311..b8213d52f6 100644 --- a/gdk/gdkevents.c +++ b/gdk/gdkevents.c @@ -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: