aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vncviewer/Viewport.cxx14
1 files changed, 12 insertions, 2 deletions
diff --git a/vncviewer/Viewport.cxx b/vncviewer/Viewport.cxx
index 7dd1ea41..1359b571 100644
--- a/vncviewer/Viewport.cxx
+++ b/vncviewer/Viewport.cxx
@@ -545,7 +545,12 @@ void Viewport::handleClipboardChange(int source, void *data)
vlog.debug("Got non-plain text in local clipboard, ignoring.");
// Reset the state as if we don't have any clipboard data at all
self->pendingClientClipboard = false;
- self->cc->announceClipboard(false);
+ try {
+ self->cc->announceClipboard(false);
+ } catch (std::exception& e) {
+ vlog.error("%s", e.what());
+ abort_connection_with_unexpected_error(e);
+ }
return;
}
@@ -555,7 +560,12 @@ void Viewport::handleClipboardChange(int source, void *data)
vlog.debug("Local clipboard changed whilst not focused, will notify server later");
self->pendingClientClipboard = true;
// Clear any older client clipboard from the server
- self->cc->announceClipboard(false);
+ try {
+ self->cc->announceClipboard(false);
+ } catch (std::exception& e) {
+ vlog.error("%s", e.what());
+ abort_connection_with_unexpected_error(e);
+ }
return;
}