[gtk+] wayland: Free the internal selection data when the selection is cleared
- From: Rob Bradford <rbradford src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] wayland: Free the internal selection data when the selection is cleared
- Date: Fri, 13 Jan 2012 16:52:46 +0000 (UTC)
commit 08f5483fb7499771c8a997085a855d979d0ec45c
Author: Rob Bradford <rob linux intel com>
Date: Fri Jan 13 16:34:11 2012 +0000
wayland: Free the internal selection data when the selection is cleared
gdk/wayland/gdkdevice-wayland.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c
index 26faad8..39b2417 100644
--- a/gdk/wayland/gdkdevice-wayland.c
+++ b/gdk/wayland/gdkdevice-wayland.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]