forked from Mirrorlandia_minetest/irrlicht
Windows: Return early if the clipboard data is not Unicode text
This commit is contained in:
parent
54b82aad26
commit
91e4129615
@ -159,10 +159,11 @@ const c8* COSOperator::getTextFromClipboard() const
|
|||||||
if (!OpenClipboard(NULL))
|
if (!OpenClipboard(NULL))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
wchar_t * buffer = 0;
|
|
||||||
|
|
||||||
HANDLE hData = GetClipboardData( CF_UNICODETEXT );
|
HANDLE hData = GetClipboardData( CF_UNICODETEXT );
|
||||||
buffer = (wchar_t*) GlobalLock( hData );
|
if (hData == NULL) // Probably not in Unicode text format
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
wchar_t * buffer = (wchar_t*) GlobalLock( hData );
|
||||||
|
|
||||||
core::wStringToUTF8(ClipboardBuf, buffer);
|
core::wStringToUTF8(ClipboardBuf, buffer);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user