Check XGetWindowProperty() return code in clipboard_event_property_notify()
This commit is contained in:
parent
e7e4d61265
commit
0dd0426e6f
@ -2382,6 +2382,11 @@ clipboard_event_property_notify(XEvent *xevent)
|
|||||||
AnyPropertyType, &actual_type_return, &actual_format_return,
|
AnyPropertyType, &actual_type_return, &actual_format_return,
|
||||||
&nitems_returned, &bytes_left, &data);
|
&nitems_returned, &bytes_left, &data);
|
||||||
|
|
||||||
|
if (rv != Success)
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (data != 0)
|
if (data != 0)
|
||||||
{
|
{
|
||||||
XFree(data);
|
XFree(data);
|
||||||
@ -2425,6 +2430,11 @@ clipboard_event_property_notify(XEvent *xevent)
|
|||||||
AnyPropertyType, &actual_type_return, &actual_format_return,
|
AnyPropertyType, &actual_type_return, &actual_format_return,
|
||||||
&nitems_returned, &bytes_left, &data);
|
&nitems_returned, &bytes_left, &data);
|
||||||
|
|
||||||
|
if (rv != Success)
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
format_in_bytes = FORMAT_TO_BYTES(actual_format_return);
|
format_in_bytes = FORMAT_TO_BYTES(actual_format_return);
|
||||||
new_data_len = nitems_returned * format_in_bytes;
|
new_data_len = nitems_returned * format_in_bytes;
|
||||||
cptr = (char *) g_malloc(g_clip_s2c.total_bytes + new_data_len, 0);
|
cptr = (char *) g_malloc(g_clip_s2c.total_bytes + new_data_len, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user