Browse Source

Swallow a possible ArgumentNullException when copying text to the system clipboard

pull/1/head
Grant Limberg 9 years ago
parent
commit
e9b956ed71
  1. 9
      windows/WinUI/ToolbarItem.xaml.cs

9
windows/WinUI/ToolbarItem.xaml.cs

@ -111,7 +111,14 @@ namespace WinUI
private void ToolbarItem_NodeIDClicked(object sender, System.Windows.RoutedEventArgs e)
{
Clipboard.SetText(nodeId);
try
{
Clipboard.SetText(nodeId);
}
catch (ArgumentNullException)
{
// tried to copy a null nodeId
}
}
private void ToolbarItem_ShowNetworksClicked(object sender, System.Windows.RoutedEventArgs e)

Loading…
Cancel
Save