mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-26 08:26:50 +00:00
Add exception handling on Clipboard.SetText, fall back to SetDataObject
This commit is contained in:
@@ -670,8 +670,23 @@ namespace renderdocui.Windows
|
||||
}
|
||||
text += Environment.NewLine;
|
||||
|
||||
if (text.Length > 0)
|
||||
Clipboard.SetText(text);
|
||||
try
|
||||
{
|
||||
if (text.Length > 0)
|
||||
Clipboard.SetText(text);
|
||||
}
|
||||
catch (System.Exception)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (text.Length > 0)
|
||||
Clipboard.SetDataObject(text);
|
||||
}
|
||||
catch (System.Exception)
|
||||
{
|
||||
// give up!
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user