From a3be239a6082cc17521efc3663e19359d5d64586 Mon Sep 17 00:00:00 2001 From: Vladimir Golovnev Date: Tue, 11 Jan 2022 07:29:42 +0300 Subject: [PATCH] Keep "torrent info" alive while generating .torrent file PR #16018. --- src/base/bittorrent/torrentinfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/base/bittorrent/torrentinfo.cpp b/src/base/bittorrent/torrentinfo.cpp index e698d0c06..e46e60b07 100644 --- a/src/base/bittorrent/torrentinfo.cpp +++ b/src/base/bittorrent/torrentinfo.cpp @@ -140,7 +140,7 @@ nonstd::expected TorrentInfo::saveToFile(const QString &path) con try { - const auto torrentCreator = lt::create_torrent(*nativeInfo()); + const auto torrentCreator = lt::create_torrent(*m_nativeInfo); const lt::entry torrentEntry = torrentCreator.generate(); const nonstd::expected result = Utils::IO::saveToFile(path, torrentEntry); if (!result)