[tracker/tracker-0.6] Fixes NB#132414, Tracker-extract crashes in tracker_utils_default_check_filename
- From: Mikael Ottela <mottela src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tracker/tracker-0.6] Fixes NB#132414, Tracker-extract crashes in tracker_utils_default_check_filename
- Date: Tue, 11 Aug 2009 14:11:59 +0000 (UTC)
commit c9ff9063fef5d22c768171f2c5cb45f8f0b461c5
Author: Mikael Ottela <mikael ottela ixonos com>
Date: Tue Aug 11 16:53:48 2009 +0300
Fixes NB#132414, Tracker-extract crashes in tracker_utils_default_check_filename
Additional checks for default titles.
src/tracker-extract/tracker-utils.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/tracker-extract/tracker-utils.c b/src/tracker-extract/tracker-utils.c
index b3f6ff4..709ecfa 100644
--- a/src/tracker-extract/tracker-utils.c
+++ b/src/tracker-extract/tracker-utils.c
@@ -24,6 +24,7 @@
#include <glib.h>
+#include "tracker-utils.h"
#include "tracker-escape.h"
void
@@ -31,12 +32,18 @@ tracker_utils_default_check_filename (GHashTable *metadata,
gchar *key,
const gchar *filename)
{
+ g_return_if_fail (key != NULL);
+ g_return_if_fail (filename != NULL);
+
if (!g_hash_table_lookup (metadata, key)) {
gchar *name = g_filename_display_basename (filename);
gchar *suffix = NULL;
suffix = g_strrstr (name, ".");
- *suffix = '\0';
+
+ if (suffix) {
+ *suffix = '\0';
+ }
g_strdelimit (name, "._", ' ');
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]