[folks] Allow the types argument for PostalAddress() to be null.
- From: Travis Reitter <treitter src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks] Allow the types argument for PostalAddress() to be null.
- Date: Thu, 12 May 2011 21:54:01 +0000 (UTC)
commit e2f7b5916b566b81cf148b81c266cb95af436d47
Author: Travis Reitter <travis reitter collabora co uk>
Date: Thu May 12 14:00:02 2011 -0700
Allow the types argument for PostalAddress() to be null.
folks/postal-address-details.vala | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/folks/postal-address-details.vala b/folks/postal-address-details.vala
index 9fc16cb..7c85e8f 100644
--- a/folks/postal-address-details.vala
+++ b/folks/postal-address-details.vala
@@ -143,9 +143,12 @@ public class Folks.PostalAddress : Object
construct set
{
this._types = new HashSet<string> ();
- this._types_ro = this._types.read_only_view;
- foreach (var type in value)
- this._types.add (type);
+ if (value != null)
+ {
+ this._types_ro = this._types.read_only_view;
+ foreach (var type in value)
+ this._types.add (type);
+ }
}
}
@@ -175,7 +178,7 @@ public class Folks.PostalAddress : Object
*/
public PostalAddress (string? po_box, string? extension, string? street,
string? locality, string? region, string? postal_code, string? country,
- string? address_format, Set<string> types, string? uid)
+ string? address_format, Set<string>? types, string? uid)
{
Object (po_box: po_box,
extension: extension,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]