Merge pull request #11181 from Chocobo1/fix

Add check for null pointer
This commit is contained in:
Mike Tzou 2019-09-04 12:09:22 +08:00 committed by GitHub
commit 80bf5978de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1941,7 +1941,7 @@ bool Session::addTorrent_impl(CreateTorrentParams params, const MagnetUri &magne
p = lt::read_resume_data(fastresumeData, ec);
// load from .torrent file when fastresume doesn't contain the required `info` dict
if (!p.ti->is_valid())
if (!p.ti || !p.ti->is_valid())
p.ti = torrentInfo.nativeInfo();
// libtorrent will always apply `file_priorities` to torrents,