mirror of
https://github.com/LazyDuchess/OpenTS2.git
synced 2025-01-22 16:21:47 -05:00
Fix musicmanager possible null ref
This commit is contained in:
parent
b6853eb140
commit
67f5a08031
1 changed files with 3 additions and 2 deletions
|
@ -120,9 +120,10 @@ namespace OpenTS2.Audio
|
|||
|
||||
private void LoadMusicCategories(List<ResourceKey> musicTitles)
|
||||
{
|
||||
var musicCategoriesBytes = _contentProvider.GetEntry(MusicCategoriesXMLKey).GetBytes();
|
||||
if (musicCategoriesBytes == null)
|
||||
var musicCategoriesEntry = _contentProvider.GetEntry(MusicCategoriesXMLKey);
|
||||
if (musicCategoriesEntry == null)
|
||||
throw new IOException("Can't find Music Categories XML!");
|
||||
var musicCategoriesBytes = musicCategoriesEntry.GetBytes();
|
||||
var xml = new PropertySet(musicCategoriesBytes);
|
||||
if (xml == null)
|
||||
throw new IOException("Can't load Music Categories XML!");
|
||||
|
|
Loading…
Reference in a new issue