diff --git a/src/app/upgrade.h b/src/app/upgrade.h index 82ea229fb..99e31c2c6 100644 --- a/src/app/upgrade.h +++ b/src/app/upgrade.h @@ -88,7 +88,7 @@ bool upgradeResumeFile(const QString &filepath, const QVariantHash &oldTorrent, libtorrent::lazy_entry fastOld; libtorrent::error_code ec; libtorrent::lazy_bdecode(data.constData(), data.constData() + data.size(), fastOld, ec); - if ((fastOld.type() != libtorrent::lazy_entry::dict_t) && !ec) return false; + if (ec || (fastOld.type() != libtorrent::lazy_entry::dict_t)) return false; libtorrent::entry fastNew; fastNew = fastOld;