[PATCH 1/3] Crash fix: when doing a clone construction, self==null.



This was not used in TrackerSelectionQuery::copy_str_list(), yet it
caused an assertion failure. Declaring copy_str_list() static instead.

Signed-off-by: Cyrille Chepelov <cyrille chepelov keyconsulting fr>
---
 .../tracker/rygel-tracker-selection-query.vala     |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/plugins/tracker/rygel-tracker-selection-query.vala b/src/plugins/tracker/rygel-tracker-selection-query.vala
index 3e9825b..7f562ec 100644
--- a/src/plugins/tracker/rygel-tracker-selection-query.vala
+++ b/src/plugins/tracker/rygel-tracker-selection-query.vala
@@ -57,10 +57,10 @@ public class Rygel.TrackerSelectionQuery : Rygel.TrackerQuery {
     }
 
     public TrackerSelectionQuery.clone (TrackerSelectionQuery query) {
-        this (this.copy_str_list (query.variables),
+        this (copy_str_list (query.variables),
               new TrackerQueryTriplets.clone (query.mandatory),
               new TrackerQueryTriplets.clone (query.optional),
-              this.copy_str_list (query.filters),
+              copy_str_list (query.filters),
               query.order_by,
               query.offset,
               query.max_count);
@@ -111,7 +111,7 @@ public class Rygel.TrackerSelectionQuery : Rygel.TrackerQuery {
         return query;
     }
 
-    private ArrayList<string> copy_str_list (Gee.List<string> str_list) {
+     private static ArrayList<string> copy_str_list (Gee.List<string> str_list) {
         var copy = new ArrayList<string> ();
 
         copy.add_all (str_list);
-- 
1.6.6.1


--=-svZduqmcipzgcCt14S8i--



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