[gnome-photos/wip/rishi/manager-model: 5/8] source-manager: Rearrange the code for subsequent changes



commit aee462e3d9341944b4a17cf77fd09a8883febefb
Author: Debarshi Ray <debarshir gnome org>
Date:   Sat Nov 12 16:16:06 2016 +0100

    source-manager: Rearrange the code for subsequent changes
    
    https://bugzilla.gnome.org/show_bug.cgi?id=774191

 src/photos-source-manager.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/src/photos-source-manager.c b/src/photos-source-manager.c
index e26c25e..88d56d2 100644
--- a/src/photos-source-manager.c
+++ b/src/photos-source-manager.c
@@ -216,16 +216,17 @@ photos_source_manager_get_for_provider_type (PhotosSourceManager *self, const gc
   g_hash_table_iter_init (&iter, sources);
   while (g_hash_table_iter_next (&iter, NULL, (gpointer *) &source))
     {
-      GoaAccount *account;
       GoaObject *object;
 
       object = photos_source_get_goa_object (source);
-      if (object == NULL)
-        continue;
+      if (object != NULL)
+        {
+          GoaAccount *account;
 
-      account = goa_object_peek_account (object);
-      if (g_strcmp0 (goa_account_get_provider_type (account), provider_type) == 0)
-        items = g_list_prepend (items, g_object_ref (source));
+          account = goa_object_peek_account (object);
+          if (g_strcmp0 (goa_account_get_provider_type (account), provider_type) == 0)
+            items = g_list_prepend (items, g_object_ref (source));
+        }
     }
 
   return items;


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