VirtualBox

Changeset 74475 in vbox for trunk/src/VBox/Additions/WINNT


Ignore:
Timestamp:
Sep 26, 2018 11:59:53 AM (6 years ago)
Author:
vboxsync
Message:

DnD/VBoxTray: Various fixes for the internal message handling.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDnD.cpp

    r74473 r74475  
    650650            }
    651651
    652             VbglR3DnDEventFree(pEvent->pVbglR3Event);
    653             pEvent->pVbglR3Event = NULL;
     652            if (pEvent)
     653            {
     654                VbglR3DnDEventFree(pEvent->pVbglR3Event);
     655                pEvent->pVbglR3Event = NULL;
     656
     657                RTMemFree(pEvent);
     658            }
    654659
    655660            return 0;
     
    18151820        if (RT_FAILURE(rc))
    18161821        {
    1817             VbglR3DnDEventFree(pVbglR3Event);
    1818             pVbglR3Event = NULL;
     1822            if (pEvent)
     1823            {
     1824                VbglR3DnDEventFree(pEvent->pVbglR3Event);
     1825
     1826                RTMemFree(pEvent);
     1827                pEvent = NULL;
     1828            }
    18191829
    18201830            LogFlowFunc(("Processing next message failed with rc=%Rrc\n", rc));
     
    18231833             * don't support the stuff we do on the guest side, so make sure we
    18241834             * don't process invalid messages forever. */
    1825             if (rc == VERR_INVALID_PARAMETER)
    1826                 cMsgSkippedInvalid++;
    1827             if (cMsgSkippedInvalid > 32)
     1835            if (cMsgSkippedInvalid++ > 32)
    18281836            {
    18291837                LogRel(("DnD: Too many invalid/skipped messages from host, exiting ...\n"));
     
    18341842             * not block the guest's UI. */
    18351843            pWnd->Reset();
    1836 
    1837             int rc2 = VbglR3DnDGHSendError(&pCtx->cmdCtx, rc);
    1838             if (RT_FAILURE(rc2))
    1839             {
    1840                 /* Ignore the following errors reported back from the host. */
    1841                 if (   rc2 != VERR_NOT_SUPPORTED
    1842                     && rc2 != VERR_NOT_IMPLEMENTED)
    1843                 {
    1844                     LogRel(("DnD: Could not report error %Rrc back to host: %Rrc\n", rc, rc2));
    1845                 }
    1846             }
    18471844        }
    18481845
     
    18591856    if (pEvent)
    18601857    {
     1858        VbglR3DnDEventFree(pEvent->pVbglR3Event);
     1859
    18611860        RTMemFree(pEvent);
    18621861        pEvent = NULL;
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