mirror of
https://github.com/taglib/taglib.git
synced 2025-05-27 21:20:26 -04:00
Don't dereference the iterator before checking to make sure that we're not
at the end of the list. Thanks to Gunnar Roth for catching this one. BUG:96926 git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@378404 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
parent
3c9f7ec7d6
commit
af8b4c7291
@ -141,7 +141,7 @@ void List<T>::sortedInsert(const T &value, bool unique)
|
||||
{
|
||||
detach();
|
||||
Iterator it = begin();
|
||||
while(*it < value && it != end())
|
||||
while(it != end() && *it < value)
|
||||
++it;
|
||||
if(unique && it != end() && *it == value)
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user