Pārlūkot izejas kodu

Do not throw exception on unmatched playlist song.

Stephen Damm 6 gadi atpakaļ
vecāks
revīzija
31fbf733c9
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      SongBrowserPlugin/DataAccess/SongBrowserModel.cs

+ 1 - 1
SongBrowserPlugin/DataAccess/SongBrowserModel.cs

@@ -494,7 +494,7 @@ namespace SongBrowserPlugin
                 return;
                 return;
             }
             }
 
 
-            this.CurrentEditingPlaylist.songs.RemoveAll(x => x.level.levelID == songInfo.levelID);
+            this.CurrentEditingPlaylist.songs.RemoveAll(x => x.level != null && x.level.levelID == songInfo.levelID);
             this.CurrentEditingPlaylistLevelIds.RemoveWhere(x => x == songInfo.levelID);
             this.CurrentEditingPlaylistLevelIds.RemoveWhere(x => x == songInfo.levelID);
 
 
             this.CurrentEditingPlaylist.SavePlaylist();
             this.CurrentEditingPlaylist.SavePlaylist();