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:
Scott Wheeler 2006-10-07 22:29:06 +00:00
parent 22a2d44a80
commit 5703a3619b

View File

@ -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;
}