mirror of
https://github.com/taglib/taglib.git
synced 2025-05-27 21:20:26 -04:00
Don't try to erase a key that isn't there.
BUG:134726 git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@593479 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
parent
22a2d44a80
commit
5703a3619b
@ -134,7 +134,9 @@ template <class Key, class T>
|
||||
Map<Key, T> &Map<Key,T>::erase(const Key &key)
|
||||
{
|
||||
detach();
|
||||
d->map.erase(find(key));
|
||||
Iterator it = d->map.find(key);
|
||||
if(it != d->map.end())
|
||||
d->map.erase(it);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user