[tracker] Added check for string validity in fn:string-join.



commit eff28c9fc0855b11c9bbeb8f2f738e5b4f491a72
Author: Mikael Ottela <mikael ottela ixonos com>
Date:   Thu Mar 4 17:07:56 2010 +0200

    Added check for string validity in fn:string-join.

 src/libtracker-db/tracker-db-manager.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/libtracker-db/tracker-db-manager.c b/src/libtracker-db/tracker-db-manager.c
index 8f2fe5b..3a1fc24 100644
--- a/src/libtracker-db/tracker-db-manager.c
+++ b/src/libtracker-db/tracker-db-manager.c
@@ -341,10 +341,12 @@ function_sparql_string_join (TrackerDBInterface *interface,
 		}
 	}
 
-	g_value_init (&result, G_TYPE_STRING);
-	g_value_set_string (&result, str->str);
+	if (str) {
+		g_value_init (&result, G_TYPE_STRING);
+		g_value_set_string (&result, str->str);
 
-	g_string_free (str, TRUE);
+		g_string_free (str, TRUE);
+	}
 
 	return result;
 }



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