summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sesman/chansrv/clipboard.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sesman/chansrv/clipboard.c b/sesman/chansrv/clipboard.c
index 80db95d1..5f01f241 100644
--- a/sesman/chansrv/clipboard.c
+++ b/sesman/chansrv/clipboard.c
@@ -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);