diff --git a/AimpLyrics/LyricsWIndow.xaml b/AimpLyrics/LyricsWIndow.xaml index c918332..f2ab7e8 100644 --- a/AimpLyrics/LyricsWIndow.xaml +++ b/AimpLyrics/LyricsWIndow.xaml @@ -109,7 +109,7 @@ - + diff --git a/AimpLyrics/LyricsWIndow.xaml.cs b/AimpLyrics/LyricsWIndow.xaml.cs index 6260e69..a88d9dc 100644 --- a/AimpLyrics/LyricsWIndow.xaml.cs +++ b/AimpLyrics/LyricsWIndow.xaml.cs @@ -76,6 +76,9 @@ private void ClearLyrics() private bool GetLyricsFromFile() { + if (_filePath is null || !new Uri(_filePath).IsFile) + return false; + string directory = Path.GetDirectoryName(_filePath); string filePattern = Path.GetFileNameWithoutExtension(_filePath) + ".*"; _lyricsFilePath = Directory.EnumerateFiles(directory, filePattern)