From 7813b7c9feb9e4526d257f336bba1df09c5cf5da Mon Sep 17 00:00:00 2001 From: Souryo Date: Tue, 4 Apr 2017 07:48:48 -0400 Subject: [PATCH] Fixed crash when opening rom via file associations --- GUI.NET/Forms/frmMain.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/GUI.NET/Forms/frmMain.cs b/GUI.NET/Forms/frmMain.cs index 00334318..f2ff29ea 100644 --- a/GUI.NET/Forms/frmMain.cs +++ b/GUI.NET/Forms/frmMain.cs @@ -58,7 +58,9 @@ namespace Mesen.GUI.Forms { var switches = new List(); 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) {