[gom] gom: Fix setting the repo twice in GomResourceGroup



commit 0639c62d2c31c0562f29856bff28bd7e89ea5ae4
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Nov 4 16:57:43 2014 +0100

    gom: Fix setting the repo twice in GomResourceGroup

 gom/gom-resource-group.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/gom/gom-resource-group.c b/gom/gom-resource-group.c
index 100a613..c293540 100644
--- a/gom/gom-resource-group.c
+++ b/gom/gom-resource-group.c
@@ -140,6 +140,7 @@ gom_resource_group_set_repository (GomResourceGroup *group,
    g_return_if_fail(GOM_IS_RESOURCE_GROUP(group));
    g_return_if_fail(GOM_IS_REPOSITORY(repository));
 
+   g_clear_object(&group->priv->repository);
    group->priv->repository = g_object_ref(repository);
    g_object_notify_by_pspec(G_OBJECT(group), gParamSpecs[PROP_REPOSITORY]);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]