From e3b6e6109e7884968635cef2ae12b139a6fd553f Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Sun, 1 Dec 2013 11:33:35 +0000 Subject: [PATCH] windows controller: Don't crash on failed clipboard copy. closes #1437 #1438 --- SparkleShare/Windows/SparkleController.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/SparkleShare/Windows/SparkleController.cs b/SparkleShare/Windows/SparkleController.cs index dc3e00d7..249a8668 100644 --- a/SparkleShare/Windows/SparkleController.cs +++ b/SparkleShare/Windows/SparkleController.cs @@ -194,7 +194,12 @@ namespace SparkleShare { public override void CopyToClipboard (string text) { - Clipboard.SetData (DataFormats.Text, text); + try { + Clipboard.SetData (DataFormats.Text, text); + + } catch (COMException e) { + SparkleLogger.LogInfo ("Controller", "Copy to clipboard failed", e); + } }