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);