summaryrefslogtreecommitdiff
path: root/src/VBox/HostServices/DragAndDrop/service.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/VBox/HostServices/DragAndDrop/service.cpp')
-rw-r--r--src/VBox/HostServices/DragAndDrop/service.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/VBox/HostServices/DragAndDrop/service.cpp b/src/VBox/HostServices/DragAndDrop/service.cpp
index 1bb87451..54c50256 100644
--- a/src/VBox/HostServices/DragAndDrop/service.cpp
+++ b/src/VBox/HostServices/DragAndDrop/service.cpp
@@ -138,15 +138,17 @@ int DragAndDropService::clientConnect(uint32_t u32ClientID, void *pvClient)
int DragAndDropService::clientDisconnect(uint32_t u32ClientID, void *pvClient)
{
/* Remove all waiters with this clientId. */
- while (!m_clientQueue.isEmpty())
+ for (size_t i = 0; i < m_clientQueue.size(); )
{
- HGCM::Client *pClient = m_clientQueue.first();
+ HGCM::Client *pClient = m_clientQueue.at(i);
if (pClient->clientId() == u32ClientID)
{
m_pHelpers->pfnCallComplete(pClient->handle(), VERR_INTERRUPTED);
- m_clientQueue.removeFirst();
+ m_clientQueue.removeAt(i);
delete pClient;
}
+ else
+ i++;
}
return VINF_SUCCESS;