Fixed crash when opening rom via file associations

This commit is contained in:
Souryo 2017-04-04 07:48:48 -04:00
parent 073f1be566
commit 7813b7c9fe

View file

@ -58,7 +58,9 @@ namespace Mesen.GUI.Forms
{ {
var switches = new List<string>(); var switches = new List<string>();
for(int i = 0; i < args.Length; i++) { for(int i = 0; i < args.Length; i++) {
switches.Add(args[i].ToLowerInvariant().Replace("--", "/").Replace("-", "/").Replace("=/", "=-")); if(args[i] != null) {
switches.Add(args[i].ToLowerInvariant().Replace("--", "/").Replace("-", "/").Replace("=/", "=-"));
}
} }
if(forStartup) { if(forStartup) {