[tracker] tracker-extract: Don't error on HAL == NULL if run on command line
- From: Martyn James Russell <mr src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tracker] tracker-extract: Don't error on HAL == NULL if run on command line
- Date: Mon, 28 Sep 2009 14:55:59 +0000 (UTC)
commit 129673d2a4554e5821fcac1b565df0bc823cbc2c
Author: Martyn Russell <martyn lanedo com>
Date: Mon Sep 28 14:47:43 2009 +0100
tracker-extract: Don't error on HAL == NULL if run on command line
src/tracker-extract/tracker-albumart.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/src/tracker-extract/tracker-albumart.c b/src/tracker-extract/tracker-albumart.c
index 57808d6..4b0a796 100644
--- a/src/tracker-extract/tracker-albumart.c
+++ b/src/tracker-extract/tracker-albumart.c
@@ -780,11 +780,15 @@ albumart_copy_to_local (TrackerStorage *hal,
gboolean on_removable_device = FALSE;
guint flen;
- flen = strlen (filename);
-
/* Determining if we are on a removable device */
#ifdef HAVE_HAL
- g_return_if_fail (hal != NULL);
+ if (!hal) {
+ /* This is usually because we are running on the
+ * command line, so we don't error here with
+ * g_return_if_fail().
+ */
+ return;
+ }
removable_roots = tracker_storage_get_removable_device_roots (hal);
#else
@@ -792,6 +796,8 @@ albumart_copy_to_local (TrackerStorage *hal,
removable_roots = g_list_append (removable_roots, "/mnt");
#endif
+ flen = strlen (filename);
+
for (l = removable_roots; l; l = l->next) {
guint len;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]