Skip to content

Commit c05ee7c

Browse files
committed
null checks in UnityServicesUIHandler
1 parent 2a833a7 commit c05ee7c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Assets/BossRoom/Scripts/Client/UI/UnityServicesUIHandler.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ void ServiceErrorHandler(UnityServiceErrorMessage error)
2727
var errorMessage = error.Message;
2828
if (error.AffectedService == UnityServiceErrorMessage.Service.Lobby)
2929
{
30-
if ((error.OriginalException as LobbyServiceException).Reason == LobbyExceptionReason.LobbyConflict)
30+
if (error.OriginalException is LobbyServiceException {Reason: LobbyExceptionReason.LobbyConflict})
3131
{
3232
// LobbyConflict can have multiple causes. Let's add other solutions here if there's other situations that arise for this.
3333
errorMessage += "\nSee logs for possible causes and solution.";
@@ -44,4 +44,4 @@ void OnDestroy()
4444
m_Subscriptions.Dispose();
4545
}
4646
}
47-
}
47+
}

0 commit comments

Comments
 (0)