- Make sure the torrent file is valid before loading it

This commit is contained in:
Christophe Dumez
2010-01-03 13:00:16 +00:00
parent 1a2eee8060
commit a7820e5f08
2 changed files with 4 additions and 0 deletions

View File

@@ -158,6 +158,8 @@ public:
// Getting torrent file informations
try {
t = new torrent_info(filePath.toLocal8Bit().data());
if(!t->is_valid())
throw std::exception();
} catch(std::exception&) {
qDebug("Caught error loading torrent");
if(!from_url.isNull()){