VirtualBox

Changeset 37095 in vbox


Ignore:
Timestamp:
May 16, 2011 8:21:19 AM (14 years ago)
Author:
vboxsync
Message:

Host::getDrives: Don't increment the iterator after erase.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/HostImpl.cpp

    r37014 r37095  
    16591659
    16601660            // remove drives from the cached list which are no longer present
    1661             for (MediaList::iterator itCached = pllCached->begin();
    1662                  itCached != pllCached->end();
    1663                  ++itCached)
     1661            MediaList::iterator itCached = pllCached->begin();
     1662            while (itCached != pllCached->end())
    16641663            {
    16651664                Medium *pCached = *itCached;
     
    16801679                if (!fFound)
    16811680                    itCached = pllCached->erase(itCached);
     1681                else
     1682                    ++itCached;
    16821683            }
    16831684
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette