Merge branch 'blender-v3.6-release'

This commit is contained in:
2023-05-19 12:53:53 +10:00
9 changed files with 50 additions and 29 deletions

View File

@@ -111,7 +111,8 @@ PyDoc_STRVAR(pyrna_WindowManager_clipboard_doc, "Clipboard text storage.\n\n:typ
static PyObject *pyrna_WindowManager_clipboard_get(PyObject *UNUSED(self), void *UNUSED(flag))
{
int text_len = 0;
char *text = WM_clipboard_text_get(false, &text_len);
/* No need for UTF8 validation as #PyC_UnicodeFromBytesAndSize handles invalid byte sequences. */
char *text = WM_clipboard_text_get(false, false, &text_len);
PyObject *result = PyC_UnicodeFromBytesAndSize(text ? text : "", text_len);
if (text != NULL) {
MEM_freeN(text);