summaryrefslogtreecommitdiffstats
path: root/qt-mobile
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2016-02-20 07:39:25 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-02-20 07:39:25 -0800
commit0b0e56edebc849818b7a76b1c4e809f357394e04 (patch)
treec5a0599c3f00ba5fb0c58774a1383bd3215f3dc1 /qt-mobile
parent5fc16910c26a8944a41840360e232bdf3c2468a7 (diff)
downloadsubsurface-0b0e56edebc849818b7a76b1c4e809f357394e04.tar.gz
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>
Diffstat (limited to 'qt-mobile')
-rw-r--r--qt-mobile/qmlmanager.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/qt-mobile/qmlmanager.cpp b/qt-mobile/qmlmanager.cpp
index 009b21fe8..1f62cc5ea 100644
--- a/qt-mobile/qmlmanager.cpp
+++ b/qt-mobile/qmlmanager.cpp
@@ -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;
}
}