Skip to content
Commit 6a7de90d authored by Thomas Fischer's avatar Thomas Fischer 💬
Browse files

Fixing conflict btwn iterating over QMap and removing element

Iterating over a QMap<K,V> object and then for one selected element
stopping the iteration and removing this element using the key, i.e.
QMap<K,V>::remove(key) interferes with the map's internal memory
management and may lead to crashes.

To avoid interference, better to remove the selected element using the
iterator directly, i.e. QMap<K,V>::erase(it).

CCBUG: 398136
parent 33e42ddb
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment