[gnome-photos/wip/rishi/manager-model: 6/8] share-point-manager:
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/rishi/manager-model: 6/8] share-point-manager:
- Date: Sat, 12 Nov 2016 15:29:35 +0000 (UTC)
commit 74ad8bfc561976fd7dfe7453af0e2772e2cd296e
Author: Debarshi Ray <debarshir gnome org>
Date: Sat Nov 12 16:23:35 2016 +0100
share-point-manager:
https://bugzilla.gnome.org/show_bug.cgi?id=774191
src/photos-share-point-manager.c | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/src/photos-share-point-manager.c b/src/photos-share-point-manager.c
index 0a351db..f79db31 100644
--- a/src/photos-share-point-manager.c
+++ b/src/photos-share-point-manager.c
@@ -133,16 +133,18 @@ photos_share_point_manager_refresh_share_points (PhotosSharePointManager *self)
g_hash_table_iter_init (&iter, sources);
while (g_hash_table_iter_next (&iter, NULL, (gpointer *) &source))
{
- PhotosSharePoint *share_point;
- const gchar *id;
+ PhotosSharePoint *share_point = NULL;
share_point = photos_share_point_manager_create_share_point_online (self, source);
- if (share_point == NULL)
- continue;
+ if (share_point != NULL)
+ {
+ const gchar *id;
- id = photos_filterable_get_id (PHOTOS_FILTERABLE (share_point));
- g_hash_table_insert (new_share_points, g_strdup (id), g_object_ref (share_point));
- g_object_unref (share_point);
+ id = photos_filterable_get_id (PHOTOS_FILTERABLE (share_point));
+ g_hash_table_insert (new_share_points, g_strdup (id), g_object_ref (share_point));
+ }
+
+ g_clear_object (&share_point);
}
photos_base_manager_process_new_objects (PHOTOS_BASE_MANAGER (self), new_share_points);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]