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
Please register or sign in to comment