NetPlay: Fixed crash when connecting to server if the right game is not already running
This commit is contained in:
parent
531e8c4cfe
commit
b556c5663e
1 changed files with 7 additions and 5 deletions
|
@ -1526,11 +1526,13 @@ namespace Mesen.GUI.Forms
|
|||
private void InitializeNsfMode(bool updateTextOnly = false, bool gameLoaded = false)
|
||||
{
|
||||
if(this.InvokeRequired) {
|
||||
if(InteropEmu.IsConnected()) {
|
||||
InteropEmu.Disconnect();
|
||||
}
|
||||
if(InteropEmu.IsServerRunning()) {
|
||||
InteropEmu.StopServer();
|
||||
if(InteropEmu.IsNsf()) {
|
||||
if(InteropEmu.IsConnected()) {
|
||||
InteropEmu.Disconnect();
|
||||
}
|
||||
if(InteropEmu.IsServerRunning()) {
|
||||
InteropEmu.StopServer();
|
||||
}
|
||||
}
|
||||
this.BeginInvoke((MethodInvoker)(() => this.InitializeNsfMode(updateTextOnly, gameLoaded)));
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue