Fixed crash at end of masterlist update.

Was due to trying to get the repo path from a closed repo handle.
This commit is contained in:
Oliver Hamlet
2014-11-01 12:39:17 +00:00
parent 86e24c4fea
commit 4c01a6f073
+10 -2
View File
@@ -68,10 +68,18 @@ namespace loot {
buf({0}) {}
~git_handler() {
string path(git_repository_path(repo));
string path;
if (repo != nullptr)
path = git_repository_path(repo);
free();
FixRepoPermissions(path);
if (!path.empty()) {
try {
FixRepoPermissions(path);
}
catch (exception&) {}
}
}
void free() {