VirtualBox

Changeset 100449 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jul 10, 2023 9:16:00 AM (17 months ago)
Author:
vboxsync
Message:

Shared Clipboard: (Release) log if clearing the Windows clipboard failed (better fix). ​​bugref:9437

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/SharedClipboard/clipboard-win.cpp

    r100448 r100449  
    149149
    150150    DWORD const dwLastErr = GetLastError();
    151     int   const rc        = RTErrConvertFromWin32(dwLastErr);
    152     if (dwLastErr != ERROR_CLIPBOARD_NOT_OPEN) /* Can happen if we didn't open the clipboard before. Just ignore this. */
    153         LogRel2(("Shared Clipboard: Clearing Windows clipboard failed with %Rrc (0x%x)\n", rc, dwLastErr));
     151    if (dwLastErr == ERROR_CLIPBOARD_NOT_OPEN) /* Can happen if we didn't open the clipboard before. Just ignore this. */
     152        return VINF_SUCCESS;
     153
     154    int const rc = RTErrConvertFromWin32(dwLastErr);
     155    LogRel2(("Shared Clipboard: Clearing Windows clipboard failed with %Rrc (0x%x)\n", rc, dwLastErr));
    154156
    155157    return rc;
     
    11691171        AssertPtr(pWinURITransferCtx);
    11701172
     1173        /* If the transfer has a data object assigned, uninitialize it here.
     1174         * Note: We don't free the object here, as other processes like the Windows Explorer still might refer to it. */
    11711175        if (pWinURITransferCtx->pDataObj)
    1172         {
    1173             delete pWinURITransferCtx->pDataObj;
    1174             pWinURITransferCtx->pDataObj = NULL;
    1175         }
     1176            pWinURITransferCtx->pDataObj->Uninit();
    11761177
    11771178        delete pWinURITransferCtx;
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