From 8612d4ef94af178bfd02d10d6d25fac27801980a Mon Sep 17 00:00:00 2001 From: TyK Date: Sat, 23 Nov 2019 21:34:30 +0800 Subject: [PATCH] fix not open clipboard when paste --- demo/gdip/nuklear_gdip.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/demo/gdip/nuklear_gdip.h b/demo/gdip/nuklear_gdip.h index 3a0a2f04..d0aafa0c 100644 --- a/demo/gdip/nuklear_gdip.h +++ b/demo/gdip/nuklear_gdip.h @@ -749,7 +749,9 @@ nk_gdip_clipboard_paste(nk_handle usr, struct nk_text_edit *edit) char* utf8; (void)usr; - if (!IsClipboardFormatAvailable(CF_UNICODETEXT) && OpenClipboard(NULL)) + if (!IsClipboardFormatAvailable(CF_UNICODETEXT)) + return; + if (!OpenClipboard(NULL)) return; mem = (HGLOBAL)GetClipboardData(CF_UNICODETEXT);