[folks] tracker: Ensure all properties of Trf.Persona are initialised



commit 31d3b43db1bc81a156fd162b1908985b435962b6
Author: Philip Withnall <philip tecnocode co uk>
Date:   Sat Jun 21 18:21:31 2014 +0100

    tracker: Ensure all properties of Trf.Persona are initialised
    
    The nickname and is-favourite properties were not being initialised on
    construction, so if Trf.Persona.nickname was accessed before being set,
    it would return null, which is invalid.

 backends/tracker/lib/trf-persona.vala |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/backends/tracker/lib/trf-persona.vala b/backends/tracker/lib/trf-persona.vala
index dee10d6..5c0a171 100644
--- a/backends/tracker/lib/trf-persona.vala
+++ b/backends/tracker/lib/trf-persona.vala
@@ -557,6 +557,8 @@ public class Trf.Persona : Folks.Persona,
       this._gender = Gender.UNSPECIFIED;
       this._full_name = "";
       this._structured_name = null;
+      this._nickname = "";
+      this._is_favourite = false;
       this._phone_numbers = new SmallSet<PhoneFieldDetails> (
           AbstractFieldDetails<string>.hash_static,
           AbstractFieldDetails<string>.equal_static);


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