[gnome-multi-writer] Use g_set_object()
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-multi-writer] Use g_set_object()
- Date: Wed, 23 Sep 2015 10:38:48 +0000 (UTC)
commit f98d7cb448734e237b4a4066028e935eefe13e62
Author: Richard Hughes <richard hughsie com>
Date: Wed Sep 23 11:31:11 2015 +0100
Use g_set_object()
src/gmw-device.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/src/gmw-device.c b/src/gmw-device.c
index f8c25d1..8ca46fe 100644
--- a/src/gmw-device.c
+++ b/src/gmw-device.c
@@ -374,9 +374,7 @@ gmw_device_set_udisks_block (GmwDevice *device, UDisksBlock *udisks_block)
GmwDevicePrivate *priv = gmw_device_get_instance_private (device);
g_return_if_fail (GMW_IS_DEVICE (device));
g_mutex_lock (&priv->mutex);
- if (priv->udisks_block != NULL)
- g_object_unref (priv->udisks_block);
- priv->udisks_block = g_object_ref (udisks_block);
+ g_set_object (&priv->udisks_block, udisks_block);
g_mutex_unlock (&priv->mutex);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]