[tracker] libtracker-miner: Check for NULL before unrefing sparql in item_update...
- From: Martyn James Russell <mr src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-miner: Check for NULL before unrefing sparql in item_update...
- Date: Wed, 16 Sep 2009 10:33:58 +0000 (UTC)
commit bf6ef599d8bc5dcdd29164726a8da0bd8d70bea2
Author: Martyn Russell <martyn lanedo com>
Date: Mon Sep 14 15:40:33 2009 +0100
libtracker-miner: Check for NULL before unrefing sparql in item_update...
Also, make warning about stat error into a normal message, this is
perfectly normal if we add a file to the queue to be processed then it
has been removed by the time we get to add it to the database, it is
not a problem.
src/libtracker-miner/tracker-miner-fs.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner-fs.c b/src/libtracker-miner/tracker-miner-fs.c
index 4ffe4af..069c267 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -527,7 +527,7 @@ item_add_or_update_cb (TrackerMinerFS *fs,
uri = g_file_get_uri (file);
if (error) {
- g_warning ("Could not process '%s': %s", uri, error->message);
+ g_message ("Could not process '%s': %s", uri, error->message);
} else {
gchar *full_sparql;
@@ -557,7 +557,11 @@ item_add_or_update_cb (TrackerMinerFS *fs,
fs->private->current_file = NULL;
}
- g_object_unref (sparql);
+ /* Can be NULL on error */
+ if (sparql) {
+ g_object_unref (sparql);
+ }
+
g_free (uri);
/* Processing is now done, continue with other files */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]