mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 13:10:19 +00:00
After freeing the samples, clear the pointer
Otherwise we might end up trying to free them a second time. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
5fc16910c2
commit
0b0e56edeb
1 changed files with 1 additions and 0 deletions
|
@ -481,6 +481,7 @@ QString QMLManager::commitChanges(QString diveId, QString date, QString location
|
|||
if (same_string(d->dc.model, "manually added dive")) {
|
||||
d->dc.maxdepth.mm = d->maxdepth.mm;
|
||||
free(d->dc.sample);
|
||||
d->dc.sample = 0;
|
||||
d->dc.samples = 0;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue