Skip to content

Commit

Permalink
Take care of a destroyed Download object
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Briza committed Nov 2, 2016
1 parent 68f0ec4 commit ab8da24
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ QString DownloadManager::downloadFile(DownloadReceiver *receiver, const QUrl &ur
m_current->deleteLater();

m_current = new Download(this, receiver, bareFileName, progress);
connect(m_current, &QObject::destroyed, [&](){ m_current = nullptr; });
fetchPageAsync(this, "https://mirrors.fedoraproject.org/mirrorlist?path=" + url.path());

return QString();
Expand Down

0 comments on commit ab8da24

Please sign in to comment.