diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2015-10-09 18:19:10 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-10-30 10:36:51 -0700 |
commit | 628eb76af456374bbab90f785d8285a916e50399 (patch) | |
tree | 47d81c87480b8a01f42c34f03fc74b6d577e1f0d /desktop-widgets | |
parent | 6930c689b7b5449a98f91430cbd96627050d8e2e (diff) | |
download | subsurface-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.cpp | 3 |
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); |