mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2025-08-30 07:25:05 +00:00
Fix a crash that could happen when hosting a game if the server disconnects.
This commit is contained in:
parent
f80dc6d9ab
commit
4845dde5a6
1 changed files with 5 additions and 2 deletions
|
|
@ -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…
Reference in a new issue