Fix NRE with ConnectionStateChanged

This commit is contained in:
teinarss
2021-06-17 18:45:07 +02:00
committed by abcdefg30
parent 3e6e5a83f3
commit 5e1468facb
5 changed files with 15 additions and 16 deletions

View File

@@ -22,12 +22,12 @@ namespace OpenRA.Mods.Common.Widgets.Logic
void ConnectionStateChanged(OrderManager om, string password, NetworkConnection connection)
{
if (om.Connection.ConnectionState == ConnectionState.Connected)
if (connection.ConnectionState == ConnectionState.Connected)
{
CloseWindow();
onConnect();
}
else if (om.Connection.ConnectionState == ConnectionState.NotConnected)
else if (connection.ConnectionState == ConnectionState.NotConnected)
{
CloseWindow();