diff --git a/platform/qt_download.cpp b/platform/qt_download.cpp index 2ba683fd0a..25c76c6f3e 100644 --- a/platform/qt_download.cpp +++ b/platform/qt_download.cpp @@ -259,7 +259,8 @@ void QtDownload::OnHttpFinished() result.m_url = m_params.m_url; result.m_file = m_params.m_fileToSave; QByteArray data = m_reply->readAll(); - result.m_data.assign(data.constData(), data.size()); + if (!data.isEmpty()) + result.m_data.assign(data.constData(), data.size()); result.m_error = fileIsLocked ? EHttpDownloadFileIsLocked : EHttpDownloadOk; m_params.m_finish(result); }