mirror of
https://github.com/Drezil/imgui.git
synced 2024-12-25 00:56:35 +00:00
Add missing CloseClipboard call
This commit is contained in:
parent
bc447bc0a4
commit
70cb427469
@ -10661,7 +10661,10 @@ static void SetClipboardTextFn_DefaultImpl(void*, const char* text)
|
|||||||
const int wbuf_length = ImTextCountCharsFromUtf8(text, NULL) + 1;
|
const int wbuf_length = ImTextCountCharsFromUtf8(text, NULL) + 1;
|
||||||
HGLOBAL wbuf_handle = GlobalAlloc(GMEM_MOVEABLE, (SIZE_T)wbuf_length * sizeof(ImWchar));
|
HGLOBAL wbuf_handle = GlobalAlloc(GMEM_MOVEABLE, (SIZE_T)wbuf_length * sizeof(ImWchar));
|
||||||
if (wbuf_handle == NULL)
|
if (wbuf_handle == NULL)
|
||||||
|
{
|
||||||
|
CloseClipboard();
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
ImWchar* wbuf_global = (ImWchar*)GlobalLock(wbuf_handle);
|
ImWchar* wbuf_global = (ImWchar*)GlobalLock(wbuf_handle);
|
||||||
ImTextStrFromUtf8(wbuf_global, wbuf_length, text, NULL);
|
ImTextStrFromUtf8(wbuf_global, wbuf_length, text, NULL);
|
||||||
GlobalUnlock(wbuf_handle);
|
GlobalUnlock(wbuf_handle);
|
||||||
|
Loading…
Reference in New Issue
Block a user