[tracker] tracker-miner-fs: avoid crash during init
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] tracker-miner-fs: avoid crash during init
- Date: Tue, 1 Sep 2015 20:43:15 +0000 (UTC)
commit 531947327ff00a82a91d99430fbfb757eac5d4a5
Author: David King <amigadave amigadave com>
Date: Tue Aug 25 10:28:34 2015 +0100
tracker-miner-fs: avoid crash during init
Correctly handle the result of tracker_sparql_cursor_get_string(), which
can be NULL.
https://bugzilla.gnome.org/show_bug.cgi?id=754055
src/miners/fs/tracker-miner-files.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/miners/fs/tracker-miner-files.c b/src/miners/fs/tracker-miner-files.c
index fb7445f..527c6e5 100644
--- a/src/miners/fs/tracker-miner-files.c
+++ b/src/miners/fs/tracker-miner-files.c
@@ -929,6 +929,9 @@ init_mount_points (TrackerMinerFiles *miner_files)
urn = tracker_sparql_cursor_get_string (cursor, 0, NULL);
+ if (!urn)
+ continue;
+
if (strcmp (urn, TRACKER_DATASOURCE_URN_NON_REMOVABLE_MEDIA) == 0) {
/* Report non-removable media to be mounted by HAL as well */
state |= VOLUME_MOUNTED;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]