Linux: Fixed potential crash on startup
This commit is contained in:
parent
8e0bac1548
commit
af65e8aba7
1 changed files with 3 additions and 1 deletions
|
@ -135,11 +135,13 @@ namespace Mesen.GUI
|
|||
|
||||
singleInstance.ListenForArgumentsFromSuccessiveInstances();
|
||||
singleInstance.ArgumentsReceived += (object sender, ArgumentsReceivedEventArgs e) => {
|
||||
frmMain.BeginInvoke((MethodInvoker)(() => {
|
||||
if(frmMain.IsHandleCreated) {
|
||||
frmMain.BeginInvoke((MethodInvoker)(() => {
|
||||
List<string> switches = frmMain.PreprocessCommandLineArguments(e.Args);
|
||||
frmMain.ProcessCommandLineArguments(switches, false);
|
||||
frmMain.LoadGameFromCommandLine(switches);
|
||||
}));
|
||||
}
|
||||
};
|
||||
|
||||
Application.Run(frmMain);
|
||||
|
|
Loading…
Add table
Reference in a new issue