From ff10b54405fe8980a022e98cd79d912c1f0ac353 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 21 Feb 2016 02:12:14 +0300 Subject: Add missing checks. --- src/gui/windows/updaterwindow.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/gui/windows/updaterwindow.cpp') 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; -- cgit v1.2.3-70-g09d2