[tracker] tracker-needle: Avoid g_markup_escape_text() critical with NULL



commit 689d6aa29bec498c15925131ed5c19b4ac45d2fd
Author: Martyn Russell <martyn lanedo com>
Date:   Fri Aug 5 16:41:27 2011 +0100

    tracker-needle: Avoid g_markup_escape_text() critical with NULL

 src/tracker-needle/tracker-result-store.vala |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/tracker-needle/tracker-result-store.vala b/src/tracker-needle/tracker-result-store.vala
index 4c1f15a..1a41a63 100644
--- a/src/tracker-needle/tracker-result-store.vala
+++ b/src/tracker-needle/tracker-result-store.vala
@@ -117,7 +117,12 @@ public class Tracker.ResultStore : Gtk.TreeModel, GLib.Object {
 					for (j = 0; j < n_columns; j++) {
 						if (j == n_columns - 1) {
 							// FIXME: Set markup for tooltip column in a nicer way
-							result.values[j] = Markup.escape_text (cursor.get_string (j));
+							string s = cursor.get_string (j);
+
+							if (s != null)
+								result.values[j] = Markup.escape_text (s);
+							else
+								result.values[j] = null;
 						} else {
 							result.values[j] = cursor.get_string (j);
 						}



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