# HG changeset patch # User Chris Cannam # Date 1399971059 -3600 # Node ID 55e552b4f1b71ecc47d14a2e14dd0da4c387cde8 # Parent c48b07b34cb329e28d342d777164f7eabbccbae5 Avoid potential crash when network connection fails diff -r c48b07b34cb3 -r 55e552b4f1b7 data/fileio/FileSource.cpp --- a/data/fileio/FileSource.cpp Wed May 07 16:51:04 2014 +0100 +++ b/data/fileio/FileSource.cpp Tue May 13 09:50:59 2014 +0100 @@ -745,7 +745,11 @@ FileSource::replyFailed(QNetworkReply::NetworkError) { emit progress(100); - m_errorString = m_reply->errorString(); + if (!m_reply) { + cerr << "WARNING: FileSource::replyFailed() called without a reply object being known to us" << endl; + } else { + m_errorString = m_reply->errorString(); + } m_ok = false; m_done = true; cleanup();