mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Don't leak memory on downloaded dives not picked
I noticed this in the mobile download code when fixing an unrelated issue - and then realized that the same was true in the desktop app as well. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
76a38b6326
commit
57d01701aa
2 changed files with 12 additions and 3 deletions
|
@ -421,6 +421,8 @@ void DownloadFromDCWidget::on_ok_clicked()
|
|||
for (int i = 0; i < downloadTable.nr; i++) {
|
||||
if (diveImportedModel->data(diveImportedModel->index(i, 0),Qt::CheckStateRole) == Qt::Checked)
|
||||
record_dive(downloadTable.dives[i]);
|
||||
else
|
||||
clear_dive(downloadTable.dives[i]);
|
||||
downloadTable.dives[i] = NULL;
|
||||
}
|
||||
downloadTable.nr = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue