mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 04:07:40 +02:00
Fix a clipboard crash issues & don't default exit Wox when exception happens.
This commit is contained in:
@@ -49,8 +49,16 @@ namespace Wox.Plugin.SystemPlugins
|
||||
SubTitle = "Copy this number to the clipboard",
|
||||
Action = (c) =>
|
||||
{
|
||||
Clipboard.SetText(result.Result);
|
||||
return true;
|
||||
try
|
||||
{
|
||||
Clipboard.SetText(result.Result);
|
||||
return true;
|
||||
}
|
||||
catch (System.Runtime.InteropServices.ExternalException e)
|
||||
{
|
||||
MessageBox.Show("Copy failed, please try later");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user