summaryrefslogtreecommitdiffstats
path: root/qt-models/weightmodel.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-11-26 23:41:56 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-11-26 17:21:34 -0800
commitddfc384b61b5990a54a5b0613a39c3ffb4ac23f4 (patch)
treefce5ed9de3c5a76e8e5671c81cda724bce504f4f /qt-models/weightmodel.h
parent7eda75d7abb0c0b42e8d71bcfcb4bc09c22ce300 (diff)
downloadsubsurface-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/weightmodel.h')
-rw-r--r--qt-models/weightmodel.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-models/weightmodel.h b/qt-models/weightmodel.h
index 2f59daf4b..21737a42c 100644
--- a/qt-models/weightmodel.h
+++ b/qt-models/weightmodel.h
@@ -31,7 +31,7 @@ public:
public
slots:
- void remove(const QModelIndex &index);
+ void remove(QModelIndex index);
void weightsystemsReset(const QVector<dive *> &dives);
private: