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:
Dirk Hohndel 2016-02-20 07:39:25 -08:00
parent 5fc16910c2
commit 0b0e56edeb

View file

@ -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;
}
}