[tracker] Bugfixed a critical warning when URN of a removable device is NULL



commit 61e3dffd7b9dc1622fe31deab7af62b8f8708358
Author: Philip Van Hoof <philip codeminded be>
Date:   Wed Nov 11 14:02:23 2009 +0100

    Bugfixed a critical warning when URN of a removable device is NULL

 src/tracker-miner-fs/tracker-miner-files.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/src/tracker-miner-fs/tracker-miner-files.c b/src/tracker-miner-fs/tracker-miner-files.c
index 6716052..f3685e6 100644
--- a/src/tracker-miner-fs/tracker-miner-files.c
+++ b/src/tracker-miner-fs/tracker-miner-files.c
@@ -623,13 +623,17 @@ query_mount_points_cb (TrackerMiner *miner,
 			}
 #endif
 
-			g_debug ("URN '%s' (mount point: %s) was not reported to be mounted, but now it is, updating state",
-			         mount_point, urn);
-			set_up_mount_point (TRACKER_MINER_FILES (miner), urn, mount_point, TRUE, accumulator);
+			if (urn) {
+				g_debug ("URN '%s' (mount point: %s) was not reported to be mounted, but now it is, updating state",
+				         mount_point, urn);
+				set_up_mount_point (TRACKER_MINER_FILES (miner), urn, mount_point, TRUE, accumulator);
+			}
 		} else if (!(state & VOLUME_MOUNTED) &&
 			   (state & VOLUME_MOUNTED_IN_STORE)) {
-			g_debug ("URN '%s' was reported to be mounted, but it isn't anymore, updating state", urn);
-			set_up_mount_point (TRACKER_MINER_FILES (miner), urn, NULL, FALSE, accumulator);
+			if (urn) {
+				g_debug ("URN '%s' was reported to be mounted, but it isn't anymore, updating state", urn);
+				set_up_mount_point (TRACKER_MINER_FILES (miner), urn, NULL, FALSE, accumulator);
+			}
 		}
 	}
 



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