[tracker/writeback-refactor-rebase] tracker-miner-fs: Fix critical warnings when cleaning up NULL GFile/GPtrArrays



commit f0fdd21ebcda1e6aadfac517b526c6995f7caea3
Author: Martyn Russell <martyn lanedo com>
Date:   Tue Jul 26 17:35:03 2011 +0100

    tracker-miner-fs: Fix critical warnings when cleaning up NULL GFile/GPtrArrays

 src/miners/fs/tracker-writeback-listener.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/miners/fs/tracker-writeback-listener.c b/src/miners/fs/tracker-writeback-listener.c
index f9a702c..34ed64b 100644
--- a/src/miners/fs/tracker-writeback-listener.c
+++ b/src/miners/fs/tracker-writeback-listener.c
@@ -308,8 +308,14 @@ sparql_query_cb (GObject      *object,
 			g_message ("  No files qualify for updates");
 		}
 
-		g_object_unref (file);
-		g_ptr_array_unref (results);
+		if (file) {
+			g_object_unref (file);
+		}
+
+		if (results) {
+			g_ptr_array_unref (results);
+		}
+
 		g_object_unref (cursor);
 	} else {
 		g_message ("  No files qualify for updates (%s)", error->message);



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