Merge pull request #5480 from akallabeth/xfreerdp_clip_fix

Fix broken clipboard after file copy
This commit is contained in:
Martin Fleisz 2019-07-18 12:20:28 +02:00 committed by GitHub
commit 5e672d474e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -1438,7 +1438,6 @@ static UINT xf_cliprdr_server_format_data_response(CliprdrClientContext*
return CHANNEL_RC_OK;
}
DstSize = 0;
pDstData = (BYTE*) ClipboardGetData(clipboard->system, dstFormatId, &DstSize);
if (!pDstData)
@ -1446,7 +1445,6 @@ static UINT xf_cliprdr_server_format_data_response(CliprdrClientContext*
WLog_WARN(TAG, "failed to get clipboard data in format %s [source format %s]",
ClipboardGetFormatName(clipboard->system, dstFormatId),
ClipboardGetFormatName(clipboard->system, srcFormatId));
return CHANNEL_RC_OK;
}
if (nullTerminated)

View File

@ -468,7 +468,8 @@ void* ClipboardGetData(wClipboard* clipboard, UINT32 formatId, UINT32* pSize)
DstSize = SrcSize;
pDstData = synthesizer->pfnSynthesize(clipboard, format->formatId, pSrcData,
&DstSize);
*pSize = DstSize;
if (pDstData)
*pSize = DstSize;
}
return pDstData;