diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-07-08 12:48:17 +0100 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2016-08-02 16:44:22 +0300 |
commit | f24c7a8df570f94c9d6c044bd2195c78858b0795 (patch) | |
tree | 431f954af3201085d868acac4b977c7e0bcbb352 | |
parent | starmath: Fix missing negation (diff) | |
download | core-f24c7a8df570f94c9d6c044bd2195c78858b0795.tar.gz core-f24c7a8df570f94c9d6c044bd2195c78858b0795.zip |
Resolves: tdf#100713 on cancel curData points to deleted parents vector entry
Change-Id: Ic2f313c357ce9526eb045791e2d27451e52a7572
(cherry picked from commit 17cb84338d6921d012af1e1245f434f90bc25142)
Reviewed-on: https://gerrit.libreoffice.org/27041
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
(cherry picked from commit bfbb5906bf85f7e4134d19fbe80216c549185e69)
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx index 5b97ad98f1f9..279a6772f84a 100644 --- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx @@ -91,7 +91,7 @@ private: virtual void execute() override; void downloadExtensions(); - void download(OUString const & aUrls, UpdateData & aUpdatData); + bool download(OUString const & aUrls, UpdateData & aUpdatData); void installExtensions(); void removeTempDownloads(); @@ -391,8 +391,8 @@ void UpdateInstallDialog::Thread::downloadExtensions() try { OSL_ENSURE(!seqDownloadURLs[j].isEmpty(), "Download URL is empty!"); - download(seqDownloadURLs[j], curData); - if (!curData.sLocalURL.isEmpty()) + bool bCancelled = download(seqDownloadURLs[j], curData); + if (bCancelled || !curData.sLocalURL.isEmpty()) break; } catch ( cssu::Exception & e ) @@ -578,12 +578,12 @@ void UpdateInstallDialog::Thread::removeTempDownloads() } } -void UpdateInstallDialog::Thread::download(OUString const & sDownloadURL, UpdateData & aUpdateData) +bool UpdateInstallDialog::Thread::download(OUString const & sDownloadURL, UpdateData & aUpdateData) { { SolarMutexGuard g; if (m_stop) { - return; + return m_stop; } } @@ -617,12 +617,14 @@ void UpdateInstallDialog::Thread::download(OUString const & sDownloadURL, Update { SolarMutexGuard g; if (m_stop) { - return; + return m_stop; } //all errors should be handled by the command environment. aUpdateData.sLocalURL = destFolder + "/" + sTitle; } } + + return m_stop; } UpdateCommandEnv::UpdateCommandEnv( cssu::Reference< cssu::XComponentContext > const & xCtx, |