[folks] e-d-s: eliminate another case of possible WebServiceFieldDetails with null value
- From: Raul Gutierrez Segales <raulgs src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks] e-d-s: eliminate another case of possible WebServiceFieldDetails with null value
- Date: Wed, 7 Sep 2011 12:36:56 +0000 (UTC)
commit c4e1477efca0d19ab9a97949063542391eca8d81
Author: Raul Gutierrez Segales <rgs collabora co uk>
Date: Wed Sep 7 12:32:08 2011 +0100
e-d-s: eliminate another case of possible WebServiceFieldDetails with null value
backends/eds/lib/edsf-persona.vala | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/backends/eds/lib/edsf-persona.vala b/backends/eds/lib/edsf-persona.vala
index 4be8308..209e927 100644
--- a/backends/eds/lib/edsf-persona.vala
+++ b/backends/eds/lib/edsf-persona.vala
@@ -957,6 +957,10 @@ public class Edsf.Persona : Folks.Persona,
private void _update_web_services_addresses ()
{
+ /* FIXME: we shouldn't immediately replace the current set of web
+ * services. Instead we should construct a new set, compare and then
+ * replace if they are actually different. Same applies for all other
+ * properties. */
this._web_service_addresses.clear ();
var services = this.contact.get_attribute ("X-FOLKS-WEB-SERVICES-IDS");
@@ -967,6 +971,9 @@ public class Edsf.Persona : Folks.Persona,
var service_name = service.get_name ().down ();
foreach (var service_id in service.get_values ())
{
+ if (service_id == null)
+ continue;
+
this._web_service_addresses.set (service_name,
new WebServiceFieldDetails (service_id));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]