summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-03-16 10:07:20 +0100
committerLars Knoll <lars.knoll@qt.io>2020-03-25 11:33:23 +0100
commit7b5e4b6944a85966a9db3f5eac7dba4695024b00 (patch)
treea82a08394535fb26883c4a3031b10f598847014c /src/gui
parentc269d8f0862fd2c581d57584e8d7e2493f387ee7 (diff)
Don't call QSet::erase() on an end iterator
hash.erase(hash.constFind()) is bound to crash if the hash doesn't contain the item we're looking for. Change-Id: Icbefca87b0258970373ec55d5dc113e6ab39c5f0 Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/itemmodels/qstandarditemmodel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/itemmodels/qstandarditemmodel.cpp b/src/gui/itemmodels/qstandarditemmodel.cpp
index fc9424763e..d0325a7f9e 100644
--- a/src/gui/itemmodels/qstandarditemmodel.cpp
+++ b/src/gui/itemmodels/qstandarditemmodel.cpp
@@ -3150,7 +3150,7 @@ QMimeData *QStandardItemModel::mimeData(const QModelIndexList &indexes) const
for (int i = 0; i < childList.count(); ++i) {
QStandardItem *chi = childList.at(i);
if (chi) {
- itemsSet.erase(itemsSet.constFind(chi));
+ itemsSet.remove(chi);
stack.push(chi);
}
}