diff --git a/PKHeX.WinForms/Controls/Slots/CryPlayer.cs b/PKHeX.WinForms/Controls/Slots/CryPlayer.cs index 737dd0aff..7507b1ea2 100644 --- a/PKHeX.WinForms/Controls/Slots/CryPlayer.cs +++ b/PKHeX.WinForms/Controls/Slots/CryPlayer.cs @@ -26,7 +26,16 @@ public void PlayCry(ISpeciesForm pk, int format) #pragma warning restore CA1031 // Do not catch general exception types } - public void Stop() => Sounds.Stop(); + public void Stop() + { + if (string.IsNullOrWhiteSpace(Sounds.SoundLocation)) + return; + + try { Sounds.Stop(); } +#pragma warning disable CA1031 // Do not catch general exception types + catch { Debug.WriteLine("Failed to stop sound."); } +#pragma warning restore CA1031 // Do not catch general exception types + } private static string GetCryPath(ISpeciesForm pk, string cryFolder, int format) {