Don't check if pointer is valid before deleting it.

deleting a null pointer is valid, so we just delete it
instead of checking if it exists.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2013-12-24 10:01:20 -02:00 committed by Dirk Hohndel
parent 2874070870
commit 8da5a8649b

View file

@ -15,8 +15,7 @@ DiveComputerManagementDialog::DiveComputerManagementDialog(QWidget* parent, Qt::
void DiveComputerManagementDialog::init()
{
if (model)
delete model;
delete model;
model = new DiveComputerModel(dcList.dcMap);
ui.tableView->setModel(model);
}