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:
Scott Wheeler 2005-01-14 13:04:36 +00:00
parent 3c9f7ec7d6
commit af8b4c7291

View File

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