diff options
author | Travis Reitter <travis.reitter@collabora.co.uk> | 2011-05-12 14:00:02 -0700 |
---|---|---|
committer | Travis Reitter <travis.reitter@collabora.co.uk> | 2011-05-12 14:45:33 -0700 |
commit | e2f7b5916b566b81cf148b81c266cb95af436d47 (patch) | |
tree | 107bbad8b4ae34654ffca2ffbd1efee7dd99740a /folks | |
parent | 58cc29fd89f7c81b6d5f42cbf5021657bcae7eda (diff) |
Allow the types argument for PostalAddress() to be null.
Diffstat (limited to 'folks')
-rw-r--r-- | 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, |