From f9ae578cd258db26938b9fac25b42a32b8150a3a Mon Sep 17 00:00:00 2001 From: Flavio Date: Fri, 5 Aug 2011 20:53:21 +0200 Subject: [PATCH] Fixed potential crash --- src/downloaditem.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/downloaditem.cpp b/src/downloaditem.cpp index 1f9ca80..36652f6 100644 --- a/src/downloaditem.cpp +++ b/src/downloaditem.cpp @@ -135,9 +135,11 @@ void DownloadItem::error(QNetworkReply::NetworkError) { qDebug() << "DownloadItem::" << __FUNCTION__ << m_reply->errorString() << m_url; #endif - qDebug() << m_reply->errorString(); + if (m_reply) { + qDebug() << m_reply->errorString(); + m_errorMessage = m_reply->errorString(); + } - m_errorMessage = m_reply->errorString(); m_reply = 0; m_status = Failed; -- 2.39.5