]> git.sur5r.net Git - minitube/commitdiff
Fixed potential crash
authorFlavio <flavio@odisseo.local>
Fri, 5 Aug 2011 18:53:21 +0000 (20:53 +0200)
committerFlavio <flavio@odisseo.local>
Fri, 5 Aug 2011 18:53:21 +0000 (20:53 +0200)
src/downloaditem.cpp

index 1f9ca8027791ffe2dfdc076ab4aedf58d2f1cb59..36652f6c338a31278c932636953013e27cb4c815 100644 (file)
@@ -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;