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>
This commit is contained in:
parent
6930c689b7
commit
628eb76af4
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user