fix can not copy file after last copy

Signed-off-by: 2fly2 <wjatchd@163.com>
This commit is contained in:
2fly2
2022-09-20 10:55:56 +08:00
committed by akallabeth
parent afd28494a2
commit 7e8986325c

View File

@@ -1486,15 +1486,12 @@ static LRESULT CALLBACK cliprdr_proc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM
case OLE_SETCLIPBOARD:
DEBUG_CLIPRDR("info: OLE_SETCLIPBOARD");
if (S_FALSE == OleIsCurrentClipboard(clipboard->data_obj))
if (wf_create_file_obj(clipboard, &clipboard->data_obj))
{
if (wf_create_file_obj(clipboard, &clipboard->data_obj))
if (OleSetClipboard(clipboard->data_obj) != S_OK)
{
if (OleSetClipboard(clipboard->data_obj) != S_OK)
{
wf_destroy_file_obj(clipboard->data_obj);
clipboard->data_obj = NULL;
}
wf_destroy_file_obj(clipboard->data_obj);
clipboard->data_obj = NULL;
}
}