aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/models.h
diff options
context:
space:
mode:
authorGravatar Michael Andreen <harv@ruin.nu>2013-07-29 13:05:28 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-08-05 06:54:46 +0200
commit396b2d10317e49de029def1f4061e03e383c9040 (patch)
tree94eb50204f94fdd44b9bd856f63c6279a1864bb2 /qt-ui/models.h
parent67fec4da704086f40f5d6699fc93603fdd0baaef (diff)
downloadsubsurface-396b2d10317e49de029def1f4061e03e383c9040.tar.gz
Fix crash in DiveComputerList::addDC() when importing from DM4.
DiveComputerList::getExact() created a temporary QList with the DiveComputerNodes matching a specific model. A pointer to a node in the list was returned, which becomes invalid when the list goes out of scope and gets destroyed. Causing a crash when the model strings are compared later. Instead of using contains() and creating a temporary list, we can just use an iterator, which should be both faster and safer. The crash is easy to trigger with DM4 imports, but can probably be triggered in other cases too. Similar problem with DiveComputerList::get(). Signed-off-by: Michael Andreen <harv@ruin.nu> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/models.h')
0 files changed, 0 insertions, 0 deletions