diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2013-12-24 10:01:20 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-12-24 07:24:11 -0800 |
commit | 8da5a8649bec48b562c0983a8fe42b594e23d60c (patch) | |
tree | bb5d66b1b42652d8abb1c8ae288a4f0f4b93ccdf /qt-ui/divecomputermanagementdialog.cpp | |
parent | 28740708701f5f082ccac98964573ce028daf4b7 (diff) | |
download | subsurface-8da5a8649bec48b562c0983a8fe42b594e23d60c.tar.gz |
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>
Diffstat (limited to 'qt-ui/divecomputermanagementdialog.cpp')
-rw-r--r-- | qt-ui/divecomputermanagementdialog.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/qt-ui/divecomputermanagementdialog.cpp b/qt-ui/divecomputermanagementdialog.cpp index af27e914f..348f93b40 100644 --- a/qt-ui/divecomputermanagementdialog.cpp +++ b/qt-ui/divecomputermanagementdialog.cpp @@ -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); } |