VirtualBox

Changeset 43996 in vbox for trunk


Ignore:
Timestamp:
Nov 29, 2012 1:24:08 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
82382
Message:

HostServices/DragAndDrop: play safe when removing clients from the queue

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/DragAndDrop/service.cpp

    r42342 r43996  
    139139{
    140140    /* Remove all waiters with this clientId. */
    141     while (!m_clientQueue.isEmpty())
    142     {
    143         HGCM::Client *pClient = m_clientQueue.first();
     141    for (size_t i = 0; i < m_clientQueue.size(); )
     142    {
     143        HGCM::Client *pClient = m_clientQueue.at(i);
    144144        if (pClient->clientId() == u32ClientID)
    145145        {
    146146            m_pHelpers->pfnCallComplete(pClient->handle(), VERR_INTERRUPTED);
    147             m_clientQueue.removeFirst();
     147            m_clientQueue.removeAt(i);
    148148            delete pClient;
    149149        }
     150        else
     151            i++;
    150152    }
    151153
Note: See TracChangeset for help on using the changeset viewer.

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