wayland: Free the internal selection data when the selection is cleared

This commit is contained in:
Rob Bradford 2012-01-13 16:34:11 +00:00
parent 1e0b22c176
commit 08f5483fb7

View File

@ -787,6 +787,17 @@ data_device_selection (void *data,
g_debug (G_STRLOC ": %s wl_data_device = %p wl_data_offer = %p",
G_STRFUNC, wl_data_device, offer);
if (!offer)
{
if (device->selection_offer)
{
data_offer_unref (device->selection_offer);
device->selection_offer = NULL;
}
return;
}
if (device->selection_offer)
{
data_offer_unref (device->selection_offer);