Check XGetWindowProperty() return code in clipboard_event_property_notify()

ulab-next-nosound
Pavel Roskin 8 years ago
parent e7e4d61265
commit 0dd0426e6f

@ -2382,6 +2382,11 @@ clipboard_event_property_notify(XEvent *xevent)
AnyPropertyType, &actual_type_return, &actual_format_return,
&nitems_returned, &bytes_left, &data);
if (rv != Success)
{
return 1;
}
if (data != 0)
{
XFree(data);
@ -2425,6 +2430,11 @@ clipboard_event_property_notify(XEvent *xevent)
AnyPropertyType, &actual_type_return, &actual_format_return,
&nitems_returned, &bytes_left, &data);
if (rv != Success)
{
return 1;
}
format_in_bytes = FORMAT_TO_BYTES(actual_format_return);
new_data_len = nitems_returned * format_in_bytes;
cptr = (char *) g_malloc(g_clip_s2c.total_bytes + new_data_len, 0);

Loading…
Cancel
Save