diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-02-21 02:12:14 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-02-21 02:53:45 +0300 |
commit | ff10b54405fe8980a022e98cd79d912c1f0ac353 (patch) | |
tree | 679a8096d1e30858760196c2a2ef95ddd6bcd58c /src/gui/windows/updaterwindow.cpp | |
parent | 6c01b391c288622d8e360d823c9c1e35a874fa58 (diff) | |
download | plus-ff10b54405fe8980a022e98cd79d912c1f0ac353.tar.gz plus-ff10b54405fe8980a022e98cd79d912c1f0ac353.tar.bz2 plus-ff10b54405fe8980a022e98cd79d912c1f0ac353.tar.xz plus-ff10b54405fe8980a022e98cd79d912c1f0ac353.zip |
Add missing checks.
Diffstat (limited to 'src/gui/windows/updaterwindow.cpp')
-rw-r--r-- | src/gui/windows/updaterwindow.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/windows/updaterwindow.cpp b/src/gui/windows/updaterwindow.cpp index 242e32911..7d2e0c4f8 100644 --- a/src/gui/windows/updaterwindow.cpp +++ b/src/gui/windows/updaterwindow.cpp @@ -312,7 +312,8 @@ void UpdaterWindow::action(const ActionEvent &event) // Skip the updating process if (mDownloadStatus != UPDATE_COMPLETE) { - mDownload->cancel(); + if (mDownload) + mDownload->cancel(); mDownloadStatus = UPDATE_ERROR; } } @@ -846,8 +847,8 @@ void UpdaterWindow::logic() mBrowserBox->addRow(_("##1 It is strongly recommended that")); // TRANSLATORS: Begins "It is strongly recommended that". mBrowserBox->addRow(_("##1 you try again later.")); - - mBrowserBox->addRow(mDownload->getError()); + if (mDownload) + mBrowserBox->addRow(mDownload->getError()); mScrollArea->setVerticalScrollAmount( mScrollArea->getVerticalMaxScroll()); mDownloadStatus = UPDATE_COMPLETE; |