aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2015-10-09 18:19:10 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-10-30 10:36:51 -0700
commit628eb76af456374bbab90f785d8285a916e50399 (patch)
tree47d81c87480b8a01f42c34f03fc74b6d577e1f0d /desktop-widgets
parent6930c689b7b5449a98f91430cbd96627050d8e2e (diff)
downloadsubsurface-628eb76af456374bbab90f785d8285a916e50399.tar.gz
It's safe to delete a Null Pointer
So don't check it with an if. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets')
-rw-r--r--desktop-widgets/mainwindow.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp
index 156034598..dcdbb89b4 100644
--- a/desktop-widgets/mainwindow.cpp
+++ b/desktop-widgets/mainwindow.cpp
@@ -1901,8 +1901,7 @@ void MainWindow::setApplicationState(const QByteArray& state) {
void MainWindow::showProgressBar()
{
- if (progressDialog)
- delete progressDialog;
+ delete progressDialog;
progressDialog = new QProgressDialog(tr("Contacting cloud service..."), tr("Cancel"), 0, 100, this);
progressDialog->setWindowModality(Qt::WindowModal);