diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-11-26 23:41:56 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-11-26 17:21:34 -0800 |
commit | ddfc384b61b5990a54a5b0613a39c3ffb4ac23f4 (patch) | |
tree | fce5ed9de3c5a76e8e5671c81cda724bce504f4f /qt-models/cylindermodel.h | |
parent | 7eda75d7abb0c0b42e8d71bcfcb4bc09c22ce300 (diff) | |
download | subsurface-ddfc384b61b5990a54a5b0613a39c3ffb4ac23f4.tar.gz |
Cylinders: Fix crash when removing cylinders
Change the remove() function of the cylinder and weight models
to take the index by value. The code used to take it by reference
and the reference would be invalidated when removing rows from
the model!
Reported-by: Gaetan Bisson <bisson@archlinux.org>
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models/cylindermodel.h')
-rw-r--r-- | qt-models/cylindermodel.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-models/cylindermodel.h b/qt-models/cylindermodel.h index 0def53ba9..1596fa87f 100644 --- a/qt-models/cylindermodel.h +++ b/qt-models/cylindermodel.h @@ -46,7 +46,7 @@ public: public slots: - void remove(const QModelIndex &index); + void remove(QModelIndex index); void cylindersReset(const QVector<dive *> &dives); bool updateBestMixes(); |