mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
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:
parent
2874070870
commit
8da5a8649b
1 changed files with 1 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue