From 0c2943e85e152cd81a68908ca2693ef8a6ab8dfc Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Fri, 15 Oct 2021 08:26:27 +0200 Subject: [PATCH] fix crash when downloading files repeatedly --- src/librssguard/network-web/downloadmanager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librssguard/network-web/downloadmanager.cpp b/src/librssguard/network-web/downloadmanager.cpp index 9922dac92..52e06864c 100644 --- a/src/librssguard/network-web/downloadmanager.cpp +++ b/src/librssguard/network-web/downloadmanager.cpp @@ -320,7 +320,7 @@ void DownloadItem::downloadProgress(qint64 bytes_received, qint64 bytes_total) { } qint64 DownloadItem::bytesTotal() const { - return m_reply->header(QNetworkRequest::ContentLengthHeader).toULongLong(); + return m_reply == nullptr ? 0 : m_reply->header(QNetworkRequest::ContentLengthHeader).toULongLong(); } qint64 DownloadItem::bytesReceived() const {