mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-14 17:07:01 +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;
|
||||
HGLOBAL wbuf_handle = GlobalAlloc(GMEM_MOVEABLE, (SIZE_T)wbuf_length * sizeof(ImWchar));
|
||||
if (wbuf_handle == NULL)
|
||||
{
|
||||
CloseClipboard();
|
||||
return;
|
||||
}
|
||||
ImWchar* wbuf_global = (ImWchar*)GlobalLock(wbuf_handle);
|
||||
ImTextStrFromUtf8(wbuf_global, wbuf_length, text, NULL);
|
||||
GlobalUnlock(wbuf_handle);
|
||||
|
Loading…
Reference in New Issue
Block a user