mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 18:23:23 +00:00
Make sure dive computer model is proper malloc'ed allocation
Reported-and-tested-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
3870916ae2
commit
710d47a2da
1 changed files with 1 additions and 1 deletions
|
@ -890,7 +890,7 @@ void MainWindow::setupForAddAndPlan(const char *model)
|
|||
clear_dive_site(&displayed_dive_site);
|
||||
displayed_dive.id = dive_getUniqID(&displayed_dive);
|
||||
displayed_dive.when = QDateTime::currentMSecsSinceEpoch() / 1000L + gettimezoneoffset() + 3600;
|
||||
displayed_dive.dc.model = model; // don't translate! this is stored in the XML file
|
||||
displayed_dive.dc.model = strdup(model); // don't translate! this is stored in the XML file
|
||||
// setup the dive cylinders
|
||||
DivePlannerPointsModel::instance()->clear();
|
||||
DivePlannerPointsModel::instance()->setupCylinders();
|
||||
|
|
Loading…
Add table
Reference in a new issue