Fix a crash that could happen when hosting a game if the server disconnects.
This commit is contained in:
parent
f80dc6d9ab
commit
4845dde5a6
@ -26,9 +26,12 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
_parent.NetworkClient.DisconnectNetwork();
|
||||
if (_parent?.NetworkClient != null)
|
||||
{
|
||||
_parent.NetworkClient.DisconnectNetwork();
|
||||
|
||||
_parent.NetworkClient.NetworkChange -= NetworkChanged;
|
||||
_parent.NetworkClient.NetworkChange -= NetworkChanged;
|
||||
}
|
||||
}
|
||||
|
||||
private void NetworkChanged(object sender, NetworkChangeEventArgs e)
|
||||
|
Loading…
x
Reference in New Issue
Block a user