mirror of
https://github.com/taglib/taglib.git
synced 2025-05-27 21:20:26 -04:00
Invalid iterators are ungood. Mmmkay?
CCMAIL:taglib-devel@kde.org git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@585155 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
parent
fdb603c88f
commit
dae3f83820
@ -196,9 +196,11 @@ void Ogg::XiphComment::removeField(const String &key, const String &value)
|
||||
{
|
||||
if(!value.isNull()) {
|
||||
StringList::Iterator it = d->fieldListMap[key].begin();
|
||||
for(; it != d->fieldListMap[key].end(); ++it) {
|
||||
while(it != d->fieldListMap[key].end()) {
|
||||
if(value == *it)
|
||||
d->fieldListMap[key].erase(it);
|
||||
it = d->fieldListMap[key].erase(it);
|
||||
else
|
||||
it++;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user