bugfix [#23725] bpy.context.window_manager.
This commit is contained in:
parent
cc0d31b921
commit
2d4e8ba22f
|
@ -617,19 +617,29 @@ static void rna_wmClipboard_get(PointerRNA *ptr, char *value)
|
||||||
char *pbuf;
|
char *pbuf;
|
||||||
|
|
||||||
pbuf= WM_clipboard_text_get(FALSE);
|
pbuf= WM_clipboard_text_get(FALSE);
|
||||||
strcpy(value, pbuf);
|
if(pbuf) {
|
||||||
|
strcpy(value, pbuf);
|
||||||
MEM_freeN(pbuf);
|
MEM_freeN(pbuf);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
value[0]= '\0';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int rna_wmClipboard_length(PointerRNA *ptr)
|
static int rna_wmClipboard_length(PointerRNA *ptr)
|
||||||
{
|
{
|
||||||
char *clipboard;
|
char *pbuf;
|
||||||
int length;
|
int length;
|
||||||
|
|
||||||
clipboard = WM_clipboard_text_get(FALSE);
|
pbuf = WM_clipboard_text_get(FALSE);
|
||||||
length = (clipboard?strlen(clipboard):0);
|
if(pbuf) {
|
||||||
MEM_freeN(clipboard);
|
length = strlen(pbuf);
|
||||||
|
MEM_freeN(pbuf);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
length= 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return length;
|
return length;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue