summaryrefslogtreecommitdiff
path: root/src/trg-file-parser.c
diff options
context:
space:
mode:
authorGravatar Alan Fitton <ajf@eth0.org.uk>2012-01-11 19:52:57 +0000
committerGravatar Alan Fitton <ajf@eth0.org.uk>2012-01-11 19:52:57 +0000
commit41a8f63ce28e228611d72156abb39d496691d8be (patch)
treef895d3226e39c5659a2af1531216ab028d6c1b06 /src/trg-file-parser.c
parent1a7fff1b49628c2d3a0c8b9140196dd5ca4c2c8c (diff)
fix memory leaks and parse a files tree in a thread if there's over 600 files, to avoid UI freezes on massive torrents.
Diffstat (limited to 'src/trg-file-parser.c')
-rw-r--r--src/trg-file-parser.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/trg-file-parser.c b/src/trg-file-parser.c
index 60dfe1f..7cf9b89 100644
--- a/src/trg-file-parser.c
+++ b/src/trg-file-parser.c
@@ -81,7 +81,6 @@ static trg_files_tree_node
}
if (isFile) {
- target_node->index = index;
target_node->length = (gint64) file_length_node->val.i;
while (lastIter)
@@ -91,6 +90,7 @@ static trg_files_tree_node
}
}
+ target_node->index = isFile ? index : -1;
lastIter = target_node;
}