[gnome-photos] source: Assert that an online source's ID & name weren't separately set



commit 920248e8066c9dea4604c9831896a4574cc95bb2
Author: Debarshi Ray <debarshir gnome org>
Date:   Thu Jan 11 19:05:13 2018 +0100

    source: Assert that an online source's ID & name weren't separately set

 src/photos-source.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/photos-source.c b/src/photos-source.c
index a28435e6..e7955257 100644
--- a/src/photos-source.c
+++ b/src/photos-source.c
@@ -190,6 +190,9 @@ photos_source_set_property (GObject *object, guint prop_id, const GValue *value,
         if (self->object == NULL)
           break;
 
+        g_return_if_fail (self->id == NULL);
+        g_return_if_fail (self->name == NULL);
+
         account = goa_object_peek_account (self->object);
         self->id = g_strdup_printf ("gd:goa-account:%s", goa_account_get_id (account));
 


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