mirror of
https://github.com/ocornut/imgui.git
synced 2024-11-28 09:30:56 +01:00
Clipboard: [windows] Fixed not closing win32 clipboard on early return. (#1264)
This commit is contained in:
parent
40ac84d701
commit
95f2706d1c
@ -9655,7 +9655,10 @@ static const char* GetClipboardTextFn_DefaultImpl(void*)
|
||||
return NULL;
|
||||
HANDLE wbuf_handle = GetClipboardData(CF_UNICODETEXT);
|
||||
if (wbuf_handle == NULL)
|
||||
{
|
||||
CloseClipboard();
|
||||
return NULL;
|
||||
}
|
||||
if (ImWchar* wbuf_global = (ImWchar*)GlobalLock(wbuf_handle))
|
||||
{
|
||||
int buf_len = ImTextCountUtf8BytesFromStr(wbuf_global, NULL) + 1;
|
||||
|
Loading…
Reference in New Issue
Block a user