Fix NullReferenceException when loading SNES MSU-1 XML file (MSU-1 still doesn't work for me though).

This commit is contained in:
J.D. Purcell 2019-10-21 20:09:55 -04:00
parent bc76a4a040
commit 09dc1df9ae
1 changed files with 2 additions and 2 deletions

View File

@ -3704,7 +3704,7 @@ namespace BizHawk.Client.EmuHawk
CoreFileProvider.SyncCoreCommInputSignals(nextComm);
InputManager.SyncControls();
if (oa_openrom != null && Path.GetExtension(oa_openrom.Path.Replace("|","")).ToLower() == ".xml")
if (oa_openrom != null && Path.GetExtension(oa_openrom.Path.Replace("|","")).ToLowerInvariant() == ".xml" && !(Emulator is LibsnesCore))
{
// this is a multi-disk bundler file
// determine the xml assets and create RomStatusDetails for all of them
@ -3714,7 +3714,7 @@ namespace BizHawk.Client.EmuHawk
for (int xg = 0; xg < xmlGame.Assets.Count; xg++)
{
var ext = Path.GetExtension(xmlGame.AssetFullPaths[xg]).ToLower();
var ext = Path.GetExtension(xmlGame.AssetFullPaths[xg]).ToLowerInvariant();
if (ext == ".cue" || ext == ".ccd" || ext == ".toc" || ext == ".mds")
{