From: Flavio Date: Fri, 5 Aug 2011 18:53:21 +0000 (+0200) Subject: Fixed potential crash X-Git-Tag: 1.5~6 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f9ae578cd258db26938b9fac25b42a32b8150a3a;p=minitube Fixed potential crash --- 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;