device-manager-xi2: Fix device instances leaking on removal

Don't add an extra reference when adding to the devices hash table. We
already own the initial reference.

https://bugzilla.gnome.org/show_bug.cgi?id=712812
This commit is contained in:
Rui Matos 2013-11-21 14:48:40 +01:00
parent 18b9384e66
commit ce1f8f1dd0

View File

@ -319,7 +319,7 @@ add_device (ClutterDeviceManagerXI2 *manager_xi2,
*/ */
g_hash_table_replace (manager_xi2->devices_by_id, g_hash_table_replace (manager_xi2->devices_by_id,
GINT_TO_POINTER (info->deviceid), GINT_TO_POINTER (info->deviceid),
g_object_ref (device)); device);
if (info->use == XIMasterPointer || if (info->use == XIMasterPointer ||
info->use == XIMasterKeyboard) info->use == XIMasterKeyboard)