VirtualBox

Changeset 66891 in vbox for trunk/src/VBox/Main/src-client


Ignore:
Timestamp:
May 15, 2017 1:45:23 PM (8 years ago)
Author:
vboxsync
Message:

Main/EmulatedUSBImpl.cpp: WebcamsMap cleanup.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/EmulatedUSBImpl.cpp

    r62485 r66891  
    392392
    393393    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    394     WebcamsMap::iterator it = m.webcams.begin();
    395     while (it != m.webcams.end())
     394    for (WebcamsMap::iterator it = m.webcams.begin(); it != m.webcams.end(); ++it)
    396395    {
    397396        EUSBWEBCAM *p = it->second;
    398         m.webcams.erase(it++);
    399         p->Release();
    400     }
     397        if (p)
     398        {
     399            it->second = NULL;
     400            p->Release();
     401        }
     402    }
     403    m.webcams.clear();
    401404    alock.release();
    402405
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