summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--installerbuilder/libinstaller/3rdparty/kdtools/KDUpdater/kdupdaterfiledownloader.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/installerbuilder/libinstaller/3rdparty/kdtools/KDUpdater/kdupdaterfiledownloader.cpp b/installerbuilder/libinstaller/3rdparty/kdtools/KDUpdater/kdupdaterfiledownloader.cpp
index 61ca9fc9d..b852d1c8c 100644
--- a/installerbuilder/libinstaller/3rdparty/kdtools/KDUpdater/kdupdaterfiledownloader.cpp
+++ b/installerbuilder/libinstaller/3rdparty/kdtools/KDUpdater/kdupdaterfiledownloader.cpp
@@ -861,9 +861,13 @@ void KDUpdater::FtpDownloader::cancelDownload()
void KDUpdater::FtpDownloader::ftpDone(bool error)
{
if (error) {
- d->ftp->deleteLater();
- d->ftp = 0;
- d->ftpCmdId = -1;
+ QString errorString;
+ if (d->ftp) {
+ errorString = d->ftp->errorString();
+ d->ftp->deleteLater();
+ d->ftp = 0;
+ d->ftpCmdId = -1;
+ }
onError();
@@ -871,7 +875,7 @@ void KDUpdater::FtpDownloader::ftpDone(bool error)
d->aborted = false;
setDownloadCanceled();
} else {
- setDownloadAborted(d->ftp->errorString());
+ setDownloadAborted(errorString);
}
}
//PENDING what about the non-error case??