diff options
Diffstat (limited to 'src/TorrentMan.cc')
| -rw-r--r-- | src/TorrentMan.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/TorrentMan.cc b/src/TorrentMan.cc index f076feb6..9c8f06a0 100644 --- a/src/TorrentMan.cc +++ b/src/TorrentMan.cc @@ -427,9 +427,11 @@ FileEntries TorrentMan::readFileEntryFromMetaInfoFile(const string& metaInfoFile Dictionary* topDic = (Dictionary*)MetaFileUtil::parseMetaFile(metaInfoFile); const Dictionary* infoDic = (const Dictionary*)topDic->get("info"); FileEntries fileEntries; - Directory* topDir; + Directory* topDir = NULL; readFileEntry(fileEntries, &topDir, infoDic, metaInfoFile); - delete topDir; + if(topDir != NULL) { + delete topDir; + } return fileEntries; } |
