diff --git a/src/Randomizer.App/Controls/RomListPanel.cs b/src/Randomizer.App/Controls/RomListPanel.cs index 85549cb9d..b2e24b010 100644 --- a/src/Randomizer.App/Controls/RomListPanel.cs +++ b/src/Randomizer.App/Controls/RomListPanel.cs @@ -23,7 +23,6 @@ public abstract class RomListPanel : UserControl private TrackerWindow? _trackerWindow; private RomLauncherService _romLauncherService; - public RomListPanel(IServiceProvider serviceProvider, OptionsFactory optionsFactory, ILogger logger, @@ -198,7 +197,15 @@ public void CopyTextToClipboard(string text) } catch (System.Runtime.InteropServices.COMException) { - Clipboard.SetDataObject(text); + try + { + Clipboard.Clear(); + Clipboard.SetDataObject(text); + } + catch (Exception e) + { + Logger.LogError(e, "Unable to copy to clipboard"); + } } }