File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -1845,11 +1845,12 @@ void DownloadManager::writeData(DownloadInfo *info)
18451845 if (info != nullptr ) {
18461846 qint64 ret = info->m_Output .write (info->m_Reply ->readAll ());
18471847 if (ret < info->m_Reply ->size ()) {
1848+ QString fileName = info->m_FileName ; // m_FileName may be destroyed after setState
18481849 setState (info, DownloadState::STATE_CANCELED);
18491850 qCritical (QString (" Unable to write download \" %2\" to drive (return %1)" ).arg (ret).arg (info->m_FileName ).toLocal8Bit ());
18501851 reportError (tr (" Unable to write download to drive (return %1).\n "
18511852 " Check the drive's available storage.\n\n "
1852- " Canceling download \" %2\" ..." ).arg (ret).arg (info-> m_FileName ));
1853+ " Canceling download \" %2\" ..." ).arg (ret).arg (fileName ));
18531854 }
18541855 }
18551856}
You can’t perform that action at this time.
0 commit comments