Browse Source

Add check for null pointer

Fix up d657c87243.
adaptive-webui-19844
Chocobo1 5 years ago
parent
commit
3104291734
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 2
      src/base/bittorrent/session.cpp

2
src/base/bittorrent/session.cpp

@ -1941,7 +1941,7 @@ bool Session::addTorrent_impl(CreateTorrentParams params, const MagnetUri &magne @@ -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,

Loading…
Cancel
Save