|
Bastien Nocera |
b1e49c4 |
From 8dc5015ae036b219c4c9579a156886aa3a722aa5 Mon Sep 17 00:00:00 2001
|
|
Bastien Nocera |
b1e49c4 |
From: phantomjinx <p.g.richardson@phantomjinx.co.uk>
|
|
Bastien Nocera |
b1e49c4 |
Date: Sat, 9 Aug 2014 19:57:10 +0100
|
|
Bastien Nocera |
b1e49c4 |
Subject: [PATCH] #323 Segmentation fault when opening ipod
|
|
Bastien Nocera |
b1e49c4 |
MIME-Version: 1.0
|
|
Bastien Nocera |
b1e49c4 |
Content-Type: text/plain; charset=UTF-8
|
|
Bastien Nocera |
b1e49c4 |
Content-Transfer-Encoding: 8bit
|
|
Bastien Nocera |
b1e49c4 |
|
|
Bastien Nocera |
b1e49c4 |
* Patch submitted in bug report from Fran├žois Melchior / James Burton
|
|
Bastien Nocera |
b1e49c4 |
---
|
|
Bastien Nocera |
b1e49c4 |
src/itdb_itunesdb.c | 6 ++++--
|
|
Bastien Nocera |
b1e49c4 |
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
Bastien Nocera |
b1e49c4 |
|
|
Bastien Nocera |
b1e49c4 |
diff --git a/src/itdb_itunesdb.c b/src/itdb_itunesdb.c
|
|
Bastien Nocera |
b1e49c4 |
index 4cc771a..1e85476 100644
|
|
|
1b986ba |
--- a/src/itdb_itunesdb.c
|
|
|
1b986ba |
+++ b/src/itdb_itunesdb.c
|
|
Bastien Nocera |
b1e49c4 |
@@ -1156,6 +1156,7 @@ static gboolean playcounts_plist_read (FImport *fimp, GValue *plist_data)
|
|
|
1b986ba |
GHashTable *pc_dict, *track_dict;
|
|
|
1b986ba |
GValue *to_parse;
|
|
|
1b986ba |
GArray *array;
|
|
|
1b986ba |
+ GValue value;
|
|
|
1b986ba |
gint i;
|
|
|
1b986ba |
guint32 mac_time;
|
|
|
1b986ba |
guint64 *dbid;
|
|
Bastien Nocera |
b1e49c4 |
@@ -1175,11 +1176,12 @@ static gboolean playcounts_plist_read (FImport *fimp, GValue *plist_data)
|
|
|
1b986ba |
|
|
|
1b986ba |
array = (GArray*)g_value_get_boxed (to_parse);
|
|
|
1b986ba |
for (i = 0; i < array->len; i++) {
|
|
|
1b986ba |
- if (!G_VALUE_HOLDS (g_array_index (array, GValue *, i), G_TYPE_HASH_TABLE)) {
|
|
|
1b986ba |
+ value = g_array_index (array, GValue, i);
|
|
|
1b986ba |
+ if (!G_VALUE_HOLDS (&value, G_TYPE_HASH_TABLE)) {
|
|
|
1b986ba |
continue;
|
|
|
1b986ba |
}
|
|
|
1b986ba |
|
|
|
1b986ba |
- track_dict = g_value_get_boxed (g_array_index (array, GValue *, i));
|
|
|
1b986ba |
+ track_dict = g_value_get_boxed (&value);
|
|
|
1b986ba |
if (track_dict == NULL)
|
|
|
1b986ba |
continue;
|
|
Bastien Nocera |
b1e49c4 |
|
|
Bastien Nocera |
b1e49c4 |
--
|
|
Bastien Nocera |
b1e49c4 |
2.26.2
|
|
Bastien Nocera |
b1e49c4 |
|