VirtualBox

Changeset 100448 in vbox


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

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

File:
1 edited

Legend:

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

    r100432 r100448  
    148148        return VINF_SUCCESS;
    149149
    150     const DWORD dwLastErr = GetLastError();
    151     AssertReturn(dwLastErr != ERROR_CLIPBOARD_NOT_OPEN, VERR_INVALID_STATE);
    152 
    153     int rc = RTErrConvertFromWin32(dwLastErr);
    154     LogFunc(("Failed with %Rrc (0x%x)\n", rc, dwLastErr));
     150    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));
     154
    155155    return rc;
    156156}
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